Gas operation, simply stated:
1) The cartridge primer is indented, igniting the powder charge.
2) The powder burns and the gas generated increases in pressure, sending the bullet down the barrel.
3) The bullet passes by the gas port in the barrel, exposing the port to the high pressure gas behind the bullet.
4) Gas is conveyed back to a piston by a tube of some length, depending on the specific weapon. The gas pressure, now decreasing because the gas is expanding into an increasingly large volume, strikes the face of the piston, forcing it to move.
5) The piston is in most cases (M1 Carbine is an exception) connected to the operating mechanism which will tilt (FAL, SKS) or rotate (AK, AR, M1 Garand, M14, etc.) the bolt to unlock it. In the M16/AR15, gas enters the carrier and exerts force against the firing pin and the carrier. This forces the carrier to the rear, rotating and unlocking the bolt from the barrel. There's a bit more to it, but this is the gist of it.
6) Due to the mass of the operating rod, bolt carrier, bolt, etc, and the inherent friction and other factors, the bullet will have exited the barrel before the operating mechanism actually moves much, if at all. The gas actually provides an "impulse" against the piston in the form of a pressure spike that rapidly builds and the drops to atmospheric pressure as the bullet exits the barrel. In this manner, the movement of the operating system after the gas impulse does not affect the aim and thus accuracy of the weapon.
7) There is some appreciable force of the case walls against the chamber and the boltface upon firing. The gas pressure pushing against the case walls and head tends to instantaneously expand and "lock" against the chamber walls, limiting the amount of force on the bolt face. In gas-operated weapons the gas pressure has to drop to atmospheric for the case to "relax" and allow the extractor to pull it out of the chamber.
BLOWBACK OPERATION:
In straight blowback weapons like most pistols chambered for 9x18, 9x17, .32 ACP, .25 ACP, .22LR, etc, the cartridge case itself is the piston against which the gas pressure pushes, countered by the mass of the slide and the force of the recoil spring. You don't see very many straight blowback pistols in 9mm or larger (the Highpoint line of 9mm and 45 ACP caliber heavy fishing sinkers and small watercraft boar anchors comes to mind) because the mass of the slide and the force of the spring has to be proportionately larger, so much so that it would take a Schwarzenegger to pull back the slide. The answer to this problem is DELAYED Blowback, in which the barrel is locked to the slide for the first few millimeters of movement, then cammed down out of the way to allow the slide to fully travel to the rear(ex. 1911, BHP, Tokarev TT, SIG, Ruger P-series, CZ-75, etc.). This brief period of time when the barrel is locked to the slide after cartridge ignition allows the whole works to get started moving rearward while the gas pressure is still quite high. The pressure drops nearly to atmospheric at about the time the barrel unlocks from the slide and the slide continues rearward to eject the spent case and chamber a new round from the mag. The same principle holds for rotating bolt pistols (ex. Colt 2000, remember that one? I don't either.) and roller-locked (ex. CZ-52) and tilting-cam locked (ex. Walther P-38 and Beretta 951, 92) handguns.
See, ya done got me started . . .
HTH
Noah