You might have noticed that any electronic device generates heat when in use. And guess what? It is absolutely normal. Unlike a laptop or a desktop, an iPhone does not have a fan to cool itself. In fact, its metal housing acts like one big heat conductor.
If you are sure your device is not overworked and no energy-demanding apps are running, check the air temperature. I'm serious.
Apple’s iOS devices can function properly between 32-95 degrees Fahrenheit (0-35 degrees Celsius). Be careful if you use the device in temperatures above or below these ranges as you may end up overheating your iPhone.
A BAD IDEA is to put your iOS device into a refrigerator or any other cold environment :). The drastic change of temperature and rapid cooling will cause condensation and potentially result in damage to the internal components. Just make sure to cool down your iPhone in a shady environment, with no direct sunlight.
If the device is heating up in normal use, it might be a sign of a hardware problem or issue with iOS.
So, you can solve this issue in 2 ways:
1. Go for a replacement at your local store.
2. Wait for the updates. Install them. After a few updates your device will work much better.
Hope it helps! Enjoy.