Identify the lock and order the appropriate rekeying kit from the manufacturer, or purchase one at a local hardware store.
Remove the lock from the door.
With the old key in the lock, remove set screws, retaining clips and caps according to the manufacturer's instructions. Remove the cylinder or plug from its housing using the tool supplied with the kit.
Empty the bottom pins from the plug and remove the old key. Insert the new key and reload the new pins into the plug with the tweezers. Refer to the numbers on the new key or use the key gauge supplied with the kit to determine the proper pins.
Replace the plug into the housing. Install retaining clips and set screws. Reassemble the lock.