Pushing the key in even further and turning hardly ever works, but it's usually been done by the time people try to get it out. Otherwise, yeah, if openable from the inside just take the knob off, open it if it's an important one or just replace. If you know someone into lock picking they'll most likely have a broken key extractor (they come with most lock pick kits) and they're not especially hard to use, like a very thin harpoon-tipped thing you shove in above/to the side of the key, grip the back and pull. Plenty of stuff on the lock pick boards. Otherwise, I guess force it open (such as twist the whole thing with a wrench, pound, cut or otherwise disconnect the knob), turn the little thing behind it to open, remove/replace the rest.
if you want to open it quickly, either drill out the lock, or screw a screw right into it, and pull the whole cylinder out
Simplest answer: Open the door from inside. Dismount the knobset so you can get to the back of the knob. Dismount the cylinder from the lock (may require dismounting the knob first). Push the broken piece of key out of the cylinder (may require lifting some pins aside, if they've dropped down behind that piece; if you're lucky, you may just be able to push the piece out the back of the plug, which is faster and easier.) Reassemble. If you can't do that, you're looking at lifting any necessary pins with a probe, and then trying to pull the fragment of key out with some kind of hook or pry or friction. Locksmiths use tools designed for the purpose, thin enough to slide in alongside the broken key and grab it to pull it out. If you can't do that, go back to the first answer, but discard and replace the knobset. Or hire a pro. Whichever you prefer.
Use a flat blade screwdriver and stick it in the keyhole as far as it will go and turn it as if it were the key. If the broken key is not the key for that lock, you might be able to catch hold of it with a small pair of needle nose pliers or maybe tweezers and remove it from the lock. If neither of those work, call a locksmith or drill out the cylinder and replace it.
Is it the right key ?