The door to your house or your apartment probably has a cylinder lock. This lock consists of two cylinders, one inside the other.
When the door is locked, pins in the outer cylinder fit into holes in the inner cylinder, preventing anything but the correct key from turning the inner cylinder and opening the lock.
But when the correct key is inserted in the keyhole, the ridges on the key lift the pins out of the holes. Only a key with exactly the right number and shape of ridges will succeed in lifting every pin out of its hole.
Once the pins are out of the holes, the inner cylinder will turn. And when it turns, it turns a bar that’s attached to it. This bar slides open the bolt and unlocks the door.
Combination locks, with numbered dials, can have up to one million possible combinations to open each lock!