The only time I have ever known my iPhone to get warm (not hot) was during charging or using the camera for video.
I would advise the OP to take it into an Apple store to be looked over, its highly unusual for iPhones to get hot to the degree mention. Failing that speak to them over the phone. Apple in fairness to them are one of the few companies that actually do give a shit about its devices and customers. Being out of warranty is less of a problem for them when faults like this occur.
To the point however, get yourself an appointment via the link mentioned earlier and get it checked out, worst they can say is no fault found or best is replace the entire unit with a new one.