Gets hot when not on the charger
There's probably a lot of apps running on your phone. I suggest force stopping your apps to avoid from this happening again. To force stop, go to Settings > Apps > look for the apps you want to force stop, tap it > Tap Force stop.
After doing that observe if it no longer gets hot.