Hi and Welcome. My Name is ***** ***** I look forward to assisting you today with your question.
What is the model and make of your phone ? Is this an iPhone ?
It is NOT supposed to get VERY warm while recharging or playing.
It may be an issue with the battery or with the mainboard. iPhone 4 is almost 6 years old and it is possible the issue is related to battery.
To make sure this is not something else, like a software glitch we can do some troubleshooting steps. Go to Settings > General > Software Updates and do all software updates available. Then go to Settings >General > Background App Refresh and turn it off.
Then double click on the home button (round button at front bottom) and this will bring multi tasker. Swipe up on the apps and close all opened apps.
Once you did that, reset your iPhone. To reset, press and hold down the Power button and Home button at the same time until it shows the Apple logo. When you see the Apple logo, release the buttons and let it boot.
This will soft reset it. If it still getting hot, then we can try to restore a fresh software from your computer. It might not help, but we can try. This is generally occurs if there is any issue with the hardware components.
Let me know how it goes please.
Remember the iPhone will get warm while making long duration calls, browsing internet, playing games and while using camera. But it is not supposed to get hot while recharging or listening to radio or music player apps. If it is getting really warm even after doing the above troubleshooting steps, then I'd recommend to take it to physically checked (to an Apple Store) or replace the phone. It is not safe to use it when it is very warm.
If the entire iPhone is getting warm (front, back and side), then it might be an issue with the phone components like logic board and other parts. If it is getting warm only on the back, then it may indicates an issue with battery.
If you have any questions, please let me know by typing your reply below and hitting Send button.