The iPhone will get warm when using graphics intensive programs, such as playing games, that has to do with the processor. It will also get warm as you charge, that is the way lithium batteries work. The cellular radio on the device will warm the device up, generally due to lower signal strength, but again, it would depend on what you are doing when you are on cellular to determine if it is the cellular radio or the device's processor that is heating up.
Understand the iPhone is a miniature computer. However, unlike a computer, there is no fan or other type of heat sync to cool it with. The only way to dissipate heat on the device is through the case. So the more you use the device, the warmer it will be and the more heat needs to be dissipated.