How much is it heating up? It's normal for a phone to get warm or even hot (especially in the summer) while watching videos, playing games or using navigation. But, if it's getting too hot to hold, something is seriously wrong. I'd suggest backing up the phone and restoring it from the back up:
Restore your iPhone, iPad, or iPod touch from a backup - Apple Support
This will tend to clear out stuck processes and similar glitches. Test if for a day or two. If that doesn't help, restore it to factory state:
Restore your iPhone, iPad, or iPod to factory settings - Apple Support
If it's still getting hot at that point, I'd guess you have a hardware issue, probably the battery. Make arrangements to have Apple look at it:
Genius Bar Reservation and Apple Support Options - Apple
If, after restoring it to factory state, everything works fine, it indicates that there is a problem with something that was installed on your phone. Rather than restoring from your back up, add your accounts back so that you get your contacts, calendars and email back, log into your Apple ID. Then, download only those apps you absolutely need. Test. If all goes well, add the less essential apps back a few at a time, watching for issues. This is the most conservative way of dealing with it.