How does a lock work?
One-line takeaway
BLUF: A pin tumbler lock holds a rotating plug inside a fixed housing. Spring-loaded pin stacks cross the boundary between them and jam the plug. The correct key lifts every stack so each break lands exactly on that boundary, freeing the plug to turn.
The lock on your front door is a two-hundred-year-old mechanical puzzle, and knowing its logic tells you what it actually protects against.
Pins, plug, and the shear line
The cylinder has two parts: a fixed outer shell and an inner plug that turns to throw the bolt. The circular seam between them is the shear line. Drilled through both are five or six vertical chambers, each holding a spring, a driver pin on top and a key pin below. At rest the springs push the stacks down so the driver pins straddle the shear line, pinning the plug in place. Cut into the key are notches of varying depth. Slide it in and each notch lifts its key pin by a specific amount. If every cut is correct, every gap between key pin and driver pin sits precisely at the shear line, nothing crosses it, and the plug rotates. One wrong depth and one pin still blocks.
A password with a tolerance
The deeper principle is that a lock is a mechanical password with a tolerance. Security comes from the number of workable combinations, the depth increments multiplied across the pin positions, and from how tightly the parts are made. That tolerance is also the weakness. Real chambers are never perfectly aligned, so if you apply slight turning pressure the plug rotates a fraction and binds against one pin first. Lift that pin to the shear line and it stays caught on the tiny ledge while the next pin starts binding. Picking is simply exploiting manufacturing slop one pin at a time. Better locks fight back with tighter machining, security pins shaped to give false feedback, and sidebars that add a second condition the pick must satisfy.
One design, everywhere, since the 1860s
Linus Yale Jr. patented the modern pin tumbler cylinder in the 1860s, and it still dominates doors worldwide because it is cheap, small and easy to rekey. Warded locks, lever locks, wafer locks in cars and cabinets, and disc detainers all solve the same problem differently. Electronic locks moved the check into software but kept a mechanical bolt, which is why a smart lock can be defeated by the strike plate rather than the cryptography. Insurers and standards bodies grade locks by how long they resist specific attacks, not by whether they resist. Master key systems add a second shear point to each pin stack, which multiplies convenience and quietly multiplies the number of keys that open the door.
Locks are not barriers
Common misconceptions treat locks as barriers. Myth: a good lock makes a door secure. Reality: attackers usually bypass the cylinder entirely, kicking the frame, prying the strike plate, or going through a window, so the lock is only as strong as the door it sits in. Myth: picking is fast and silent like in films. Reality: it takes practice, the right tension, and often minutes, which is why burglars rarely bother. Myth: bumping and picking are the same. Reality: bump keys use a struck impulse to knock all driver pins upward at once, a different attack that specific pin designs resist. Myth: more pins always means more security. Reality: pin count matters far less than tolerances, pin shapes and whether the lock has a sidebar.