This article is free to read. Creating a lesson uses your daily or stored credits; review the language and settings before starting.
How does a lock work?
Quick answer
A lock uses a key to move internal pins or discs so they align at a shear line. In a pin-tumbler lock, spring-loaded pin pairs block the plug until the correct key lifts each to the exact height. Then the plug rotates, retracting the latch. Wrong keys leave pins misaligned, so the plug cannot turn.
A lock works by using a key to align internal pins or discs so the plug can rotate and release the latch. When the correct key is inserted, the pins line up at the shear line, allowing the cylinder to turn and the door to open.
Step by step
- Insert the key into the plug (cylinder), pushing the key pins upward against the driver pins.
- Each key pin is pushed to a height determined by the key's cut depth, compressing the driver pin's spring.
- When the key is correct, the gap between every driver and key pin sits exactly at the shear line.
- The plug is now free to rotate because no pin crosses the shear line.
- Turning the plug moves the cam or tailpiece, which retracts the latch from the door frame.
- When the key is removed, springs push the driver pins back down, locking the plug again.
Key things to understand
- A lock is a mechanical or electronic device that secures an opening by preventing movement until a specific key or code is provided.
- In a pin-tumbler lock, the plug (cylinder) is blocked by a series of spring-loaded pins that sit in the housing and plug.
- Each pin pair consists of a driver pin (in the housing) and a key pin (in the plug), and their combined length matches the key's cut depth.
- When the correct key is inserted, the gaps between each driver and key pin align exactly at the shear line between plug and housing.
- With all gaps at the shear line, the plug can rotate freely, turning the cam or tailpiece to retract the latch and open the lock.
Labelled diagram
- Housing
The fixed outer body that holds the driver pins and springs.
- Plug
The rotating cylinder that holds the key pins and turns with the key.
- Pins
Driver pins sit above key pins; their combined length matches the key cut.
- Shear line
The gap between plug and housing; pins must align here to allow rotation.
- Key
Lifts each pin pair so the gap sits exactly at the shear line.
- Cam
Attached to the plug; rotates to retract the latch when the plug turns.
Real-world examples
- A standard house door lock uses a pin-tumbler cylinder; the key's unique cuts match the pin lengths inside.
- A padlock on a gym locker often uses a wafer lock, which is cheaper but easier to pick than a pin-tumbler.
- Many car door and ignition locks use wafer tumblers: flat plates that must all line up with the edge of the plug before it turns.
- A hotel keycard lock uses an electronic reader and a motor-driven latch, but the mechanical bolt still slides to secure the door.
Common mistake
✗ Myth: A lock is impossible to open without the exact key.
✓ Fact: Most mechanical locks can be picked or bypassed because they rely on precise tolerances that can be exploited. However, picking requires skill and time, and higher-security locks include features like security pins to make it much harder.
People also ask
How does a pin tumbler lock work?
What is the shear line in a lock?
Why are some locks harder to pick?
What happens if you insert the wrong key?
How does a lock pick work?
What is the difference between a pin-tumbler lock and a wafer lock?
Can a lock be rekeyed to a different key?
Part of the guide: Everyday Machines →

