When you picture in your mind the traditional image of a key . . . or if you've seen a picture of an old-time lock, what you've probably seen is what is known as a warded lock. This is perhaps the oldest style of lock that still exists in common usage. To refresh your memory, the warded lock is the one shaped somewhat like a lightbulb: a rectangular on the buttom with a roundish bulb at the top.
A warded lock secures a door with the use of a series of obstructions inside (called "wards," hence the name). Only if those obstructions are pushed out of the way will the lock open. And the only thing that can push these obstructions out of the way is a key that has a notch corresponding to each of these wards. Once a notch has pushed each ward out of the way, the key will rotate freely, and open the door.

