To properly understand how firearms work, one must first recognize the difference between two fundamental mechanical systems in them. One is the locking system, and the other is the operating system. The locking system is what keeps the breech end of the gun sealed when firing (examples include tilting bolts, rotating bolts, flapper locking, roller locking, and others). The operating system is what allows the gun to unlock once pressure is at a safe level after firing (examples include long and short gas pistons, long and short recoil, and others). Blowback firearms are somewhat of an exception to this, as they use a single mechanical system to both lock and unlock (inertia of the moving parts).