Broken key extraction is the job of removing the piece of key that stays inside the lock cylinder when a key snaps. The locksmith does it with very thin extractors that slide in alongside the broken piece to hook it, without taking the door apart.
Usually, if nobody has tampered with it first, the key comes out and the cylinder keeps working. Things get complicated when someone has tried to get it out with a hairpin, a craft knife or glue: the piece gets pushed further in, the pins are damaged and sometimes there is no option left but to replace the cylinder.
In the meantime, do not put anything into the lock or try to turn it with what is left of the key. And once it is out, think about why it broke: a badly worn key or a cylinder that is stiff to turn gives you a warning beforehand. If it has just happened to you, our broken key extraction page explains how we work.