After firing, one part of the discharged gas enters through the gas port (an opening for gas to enter, as the bullet is fired and advances near the muzzle the inside of the barrel between the bullet and the cartridge becomes an airtight compartment, and because of the high pressure a part of the gas therein enters through the gas port) and pushes a gas piston inside the gas cylinder backwards, pushes back the turn bolt (the part that touches the bullet) and bolt carrier (the part that supports the bolt), and raises the hammer.