The body, or cylinder, of a door lock is the part of the lock into which you insert the key, and it's the part of the lock that prevents the door from opening until the correct key is inserted. Inside the lock body, a series of spring-loaded pins keeps the cylinder from turning, and when a key is inserted, its uneven edge pushes the pins upward by varying amounts. The pins are each divided into an upper and lower half, and the correct key will move the pins so that the joints between their halves align and allow the cylinder to turn.
Spring Bolts and Dead Bolts
The lock cylinder engages a bolt that's inside the door itself and perpendicular to the cylinder. When the lock is closed, the bolt extends from the door into the door frame and holds the door closed. When the correct key is turned in the cylinder, it retracts the bolt and allows the door to open.
A spring bolt is held in the locked position by a spring; the spring can be compressed to push the bolt into the unlocked position, and when the spring is released, the bolt snaps back into the locked position. This action allows the door to be closed when the lock is locked, but a key is required to open the door once it's closed.
A dead bolt is not spring-loaded and can be opened and closed only by turning the lock cylinder with the key or a knob on the inside of the door. Dead bolts are more secure than spring bolts because they can't be opened by sliding a thin object between the door and the door frame.
Strike Plate and Box
The strike plate is a metal plate that attaches to the door frame at the point where the bolt extends into the frame. The purpose of the strike plate is to guide the bolt into the frame when the lock is engaged and reinforce the connection to make the lock more secure. Behind the opening in the strike plate, a metal box is recessed into the door frame to receive the end of the bolt; this box provides reinforcement and holds the bolt securely in the frame when the lock is engaged.
Instead of mechanical pins and keys, an electronic lock uses a small motor and actuators inside the lock to both hold the lock closed and to retract the bolt when the lock receives the proper signal from a keypad, a key card or other remote-control device.