1. A short circuit is the usual cause
A coin cell and a metal object in the same pocket can touch. The battery then pushes a lot of current through the metal, and it heats up very quickly.
2. Stop using it if it is damaged
If the battery is hot, swollen, leaking or has a torn wrapper, take it out of your pocket and put it somewhere safe. Do not put it back in a device, and do not try to charge it.
3. Coins and keys are the usual culprits
A loose coin, a key and a button cell are all about the same size. Keep batteries in a case or in their packaging until they go straight into a device.
4. If a battery heats up in a bag
Take the bag outside, tip the contents onto a surface that does not burn, and move away from anything that burns. If it smokes or flames, leave the area and call your local emergency number.