If you are in hurry an the key broke into the lock of a door or closet an key maker is not available, then how to deal with such an emergency situation saving the door?
This YouTube video shows many ways to get through a door without picking the lock or breaking the door. https://www.youtube.com/watch?v=rnmcRTnTNC8
If a short bit of the key is still sticking out of the lock, you may be able to grab it tightly with a pair of pliers and slowly pull the half-key out. That will allow other keys to be inserted into the lock.
If that's the only key you had, then you may be able to use it (temporarily!) by holding it with the pliers. Soon you will need to get a new key cut to match it. A key-maker may be able to do that from the half-key that you still have.
If a tiny bit of the key is sticking out, a pair of nail clippers might work. They make it easier to apply force than tweezers do.
You will likely bend or dull the nail clippers, but it's a good "home remedy" if you need to get the key out in a hurry—maybe you have a spare, or you can use a key duplication method like this one: