It's a frustrating experience. You're in a hurry and turn the key too hard when locking the door. Suddenly you're standing there with half the key in your hand and the other half stuck in the lock. Don't panic. You can extract the key yourself by following a basic procedure. Once you remove the broken key, the door lock should be in working condition again.
Squirt spray lubricant into the lock to help grease the key. This will make the key easier to remove.
Stick the tips of a pair of needle nose pliers into the keyway and attempt to grasp the key. Pull slowly, wiggling the key slightly when you feel resistance. If the key will not budge, continue to the next step.
Slide in a small jigsaw blade or other narrow metal object that is capable of latching onto the cuts of the key. Pull the blade down and toward you. When you feel the blade snag the key, pull it out slowly. If the key won't budge, turn the blade in the lock to move the tumblers, then try again to draw out the blade and key piece.
Keys become weak with continued use, so have at least one spare key for each lock. Keep the pieces of the broken key in case all other keys are lost and you need a replacement.