Have you actually done this to a lock - to me it sounds like a great way to bugger one up.
Keveljay has it spot on, and if there isn't a spare key, use a beefy paperclip (or similar) inserted ito the keyway to push the broken key outwards. Just make sure the "teeth" of the key are pointing...