http://home.howstuffworks.com/home-improvement/household-safety/security/lock-picking1.htm
Lock Picking: Cylinder Locks
Most deadbolts use a cylinder lock. In the cylinder lock, the key turns a cylinder, or plug, which turns an attached cam. When the plug is turned one way, the cam pulls in on the bolt and the door can open. When the plug turns the other way, the cam releases the bolt and the spring snaps it into place so the door cannot open. In a deadbolt lock, there is no spring mechanism -- the turning cylinder slides the bolt forward and backward. A deadbolt is more secure than a spring-driven latch since it's much harder to push the bolt in from the side of the door.
Inside a cylinder lock, there is a sort of puzzle, which only the correct key can solve. The main variation in lock designs is the nature of this puzzle. One of the most common puzzles -- and one of the easiest to pick -- is the pin-and-tumbler design, shown below.
The main components in the pin-and-tumbler design are a series of small pins of varying length. The pins are divided up into pairs. Each pair rests in a shaft running through the central cylinder plug and into the housing around the plug. Springs at the top of the shafts keep the pin pairs in position in the plug. When no key is inserted, the bottom pin in each pair is completely inside the plug, while the upper pin is halfway in the plug and halfway in the housing. The position of these upper pins keeps the plug from turning -- the pins bind the plug to the housing. Here's how it works:
When you insert a key, the series of notches in the key push the pin pairs up to different levels. The incorrect key will push the pins so that most of the top pins are still partly in the plug and partly in the housing, like this.