Main reasons why a smartphone is getting heated up are :
-High end multi tasking: this results in maximum usage of RAM and battery, resulting in heating up.
-The settings enabled: bluetooth enabled, wifi , brightness and other features when turned on can reduce battery life and increasing heat.
-Temperature in your region : the hot regions makes your phone more hot, this can be compared when using the same apps in a colder region.
-a duplicate charger
-too many apps when running in the background also utilizes the processor to its maximum leading to severe heat