Don't push it further in
Avoid trying the other half of the key, or anything else, in the lock. It can push the broken piece deeper.
Avoid glue and DIY tricks
Superglue and similar tricks often glue the key into the cylinder, meaning the lock must be replaced.
If part of the key is sticking out
You may be able to grip it gently with fine pliers and pull straight out. If it doesn't move easily, stop.
Call a locksmith
A locksmith can usually remove the broken piece with specialist tools and cut a new key. If the lock is worn, they may recommend rekeying or replacing it.