A pin tumbler lock opens when the cuts on the key lift each stack of pins to exactly the right height. To rekey it, we remove the cylinder from the door, slide the plug out with a follower tool so the top pins and springs stay in place, and tip out the bottom pins. New bottom pins are then chosen to match the cuts of a new key.
Once the plug is back in, the old key lifts the pins to the wrong heights and the cylinder will not turn. Nothing about the outside of the lock changes. The knob, the deadbolt and the finish are the same ones you had before, which is why rekeying makes sense when the hardware is in good shape and only the keys are in doubt.
The same method lets us key locks alike. If your front deadbolt, back door and garage entry share a keyway, for instance all Schlage or all Kwikset, we can pin every cylinder to one key. Locks from different keyway families cannot share a key until one of them is swapped, and we will point out which one when we look.