In a gas-actuated system some of the expanding gases from the round being fired are routed from a port just behind the muzzle (where the pressure is lower) in front of a piston, typically lying over the barrel. The piston is forced backwards by the gas, and is connected to the breech of the gun, which is unlocked by the backwards motion induced by the piston when the round leaves the barrel. This system is useful for machine guns and assault rifles, and permits use of a long barrel and makes efficient use of the propellant.
Usually, the speed at which the weapon fires is determined by a regulator, which controls the gas flow to the piston. The greater the gas flow, the faster the weapon will fire.
Weapons using this type of automatic reloading include the M16, AK-47 and derivatives. The M16 is different than most however, with the gas travelling all the way down the tube from a port located further to the rear than on most designs. The gas blows directly on the breech, instead of operating a piston, making the entire system simpler and lighter.