If the right key is inserted, the pins will raise exactly to the right height. The break where the top driver and the bottom pin are separated will be at an equivalent height. Therefore unlocking the cylinder allowing it to turn. These pins are very specific. If one pin were not in place when the key is inserted, it would not turn.
Combination locks are extremely useful because they have no key.
If you lost the key, someone else may have the access to your lock. With combination locks, it requires you to memorize the correct numbers or pattern to turn the lock and then to access it. This is great for people who always lose their things. These kinds of locks are mainly found in padlocks and briefcases. The lock may be somewhat like a dial design, which contains disks inside the lock and has to be rotated using the dial to get to the right combination.