Your key broke in the lock. Don’t panic and don’t freak out because that’s when you can cause more damage than good. You should first try lubricating the keyhole with some WD40 or any type of oil, to help loosen the key. Then you can attempt one or some of the options below and if everything fails, call a locksmith.
You would need to have a hammer or heavy object for this option and maybe a cloth or rag. Hold the lock with the key facing downward. Place the cloth or rag on the side facing upward so that when the hammer hits, it would not cause as much damage. Strike the hammer or heavy object on the side facing upward, not to hard but firmly. The point is to try to knock the key out of the lock with minimal damage. If there is damage though, either call a locksmith to replace the core or purchase a new lock. Depending on the type of lock, I would opt for the latter because I am paranoid about locks.
You would need to be very careful with this option because you do not want to push the key further into the keyhole. If there is enough of the key protruding, you can attempt to pull it out using the tweezers. However, ensure that the tweezers can open wide enough to fit around the key. An alternative to tweezers are needle nose pliers. But again, be very careful that you don’t end up pushing it further.
Probe and Pull
If you have any WD40 or any type of oil around, you can use it to lubricate the keyhole to help loosen the key. With this probe and pull method, you would have to allocate 2 small objects that can fit on the sides of the key. These may include wire, bobby pins or safety pins for the lock repair. Slide the objects on either side of the key and attempt to turn the wrist in the direction you would to remove the key, usually to the left. Once you turn it, attempt to pull it toward you. This may take a few attempts because it is a technique, but be careful of pushing the key further inward. If the key moves outward, you can use a pliers, tweezers or your fingers to try to pull it out fully.
This option would only work if the key is protruding and super glue is very dangerous for the keyhole, so caution must be taken. Place some glue on an object such as a small knife blade, a paper clip or a thin piece of wire. Put the side with the glue unto the protruding key and hold steady for some time, until the glue dries and the objects bond. Be sure to wipe away any glue that may be leaking since you cannot allow it to fall inside the keyhole. You can use a hairdryer to speed up the drying process if necessary. Once you are sure they have bonded together, attempt to turn the key and pull it out. Hopefully if the bond breaks while doing this, the key would have been pulled further outward and you can attempt to remove it with a needle-nose pliers or tweezer.