You may be asking, what is “rekeying” a lock? A rekey is when you rearrange the parts within a lock to set the lock to work with a new code. The series of cuts on the blade of a key make up the code. So a new code means the lock will work with a new key. Sometimes the code will appear on the key as a series of numbers.
Most locks can typically be rekeyed, though some cannot, and others will have operational problems if they’re rekeyed.
Usually old locks are not worth rekeying. The reason is that with long use of the lock, the cylinder within the lock goes through a lot of wear and tear, causing the hole where the key is inserted to get wider. (This is especially a problem in cheaper locks). This means that the key will not fit snugly into the lock and the pins in the cylinder may shift up or down. One symptom of this is when an old lock starts to stick or be difficult to open, or if you need to jiggle the key in order to get it to turn.
Some locks are purposefully designed so that they cannot be opened and rekeyed.
For locks that can be rekeyed, here are the steps. First, the locksmith determines the “key way” of the lock, i.e. what type of blank key it corresponds with. Next, he will remove the lock from the door and inspect the external parts for corrosion. If the external parts look okay, he next takes the lock apart and inspects the internal parts for corrosion and wear and tear. Finally, the locksmith will replace any damaged parts and rearrange the pins according to the new code (the new key).
In order to rekey a lock, the locksmith will need to have the original key. If there is no original key, some locks will need to be fully replaced. This is typically true for high security locks and commercial locks where the original key is necessary to remove the lock from the door. Many low-grade locks can be picked or shimmied.
Taking apart and rekeying a lock are tasks that should only be done by professional locksmiths. Owners should not attempt to rekey their own locks, even with kits they buy online. They can easily end up with a broken lock due to differences in lock specs between manufacturers. This “cheap” solution can end up being very expensive.