How Does a Cylinder Lock and Key Work?
A cylinder lock is made up of a revolving metal cylinder. Five small pins fall down into the cylinder when it is locked. There are springs that hold the pins tight inside. The pins are of different lengths, and can be released only by a key of the correct shape.
The upper pins are the important part of this, as they will stop the cylinder turning when in a locked position. As soon as the door is unlocked then these pins are released causing the cylinder to turn again.
A cylinder lock key has wavy teeth cut into its edge and grooves on the sides that match the shape of the keyhole. The wavy edge of the key is so shaped that when the key is placed all the way in the lock, the pins will be raised so that their tops line up exactly with the top of the cylinder. This frees the cylinder so that it can be turned to open the lock.
Subsequently, if the key you use is not the correct one for that particular lock, then you will not have the right pattern to move the pins accordingly. Without the pins in their right positions and height, then the door will stay locked and the key will not turn.