Try to not use your phone while you’re charging it and don’t use high CPU-sucking apps, like Snapchat or Facebook, for long periods of time. If it starts getting warm, give your phone a break. If you are not doing these things, and your phone still gets hot to the touch, then you may want to get it looked at by a professional, as it could be a sign of a manufacturing defect.