My samsung s5 heats up for no reason. I have tried factory reset my phone. There's no problem after i factory reset. After i download an app,the heating starts..but when i turn on power saving mode,the heating stops. What's the main cause of the heating? The source can't be from an app. It does not matter what app,it just start to heat up when there's app and does not heat up when i turn on power saving mode. I have tried safe mode...it works for awhile and starts to heat up when i turn off.
If I may elaborate on Vivek's answer, it is likely being caused not so much by apps running in the background but by what apps you have running in the background. When you put your device into battery saver mode, it disables all apps' ability to connect to the internet without being the app you are currently interacting with. Some really bad offenders in abuse of background data (connecting to a website when you are not using the app) are social networking sites such as Facebook and messaging apps such as Skype and Kik. Google's mobile radio active bug only augments the drain. Greenify will automate the process of shutting down these power-hungry apps.
Additionally, check to see if any app is causing an issue with wakelocks. The active section of the battery graph would be almost solid.
It happens due to apps running in background. This also causes battery drain. If you feel it really annoying then I have a solution. You just need to download an app named DS Battery saver. This app is good on saving battery and heating.