A phone that heats up when not in use has something working too hard.
1. Check Battery settings for an app using power in the background.
2. Turn off hotspot, Bluetooth and location when not needed.
3. A weak signal makes the phone work harder to stay connected.
4. A worn or swollen battery heats up more.
5. A shorted part on the board after a drop or water can cause steady heat.
If the phone is hot even when switched off, remove it from your pocket and have it checked straight away.