A bolt is the part of a repeating, breechloading firearm that blocks the rear opening (breech) of the barrel chamber while the propellant burns, and moves back and forward to facilitate loading/unloading of cartridges from the magazine.
In manually operated firearms, such as bolt-action, lever-action, and pump-action rifles or shotguns, the bolt is held fixed by its locking lugs during firing, forcing all the expanding gas forward.
It is manually unlocked and moved to extract the spent casing and chamber another round.
In a self-loading firearm (semi-automatic, burst fire, or fully automatic), the bolt cycles back and forward between each shot, propelled back by recoil (recoil operation) or the expanding gas (blowback and gas operation) and forward by a spring.
When the bolt moves forward, it picks up a new cartridge from the magazine and pushes it into the chamber.