There are some variations, such as revolvers, but mostly yes, you put it in the magazine via a valve at the bottom.
Dependant on the pistol and conditions, style of play etc, you'll get between 1-4 mags of gas into a magazine though I tend to top up at every break in play just to be sure.
My 1911 would get 2.5 mags out of each charge of gas, my new USPc I'm not sure, it just keeps going, probably 4+
My old TM Desert Eagle years ago would need refilling every magazine, my old Para Ord would take 3 mags worth and my hi-capas (all seven that I have previously owned) took 2-3.
Hope that helps!