Can you be more specific, when does it heats ? You can try couple of steps. If you're using any back cover then remove it. Don't use the device if it's charging. Close the apps which you're not using from multi-tasking window. Try reset all settings as well just to be sure. Revert back with issue if it still persists.
Thank you for Joining Samsung community. We would recommend you to follow some troubleshooting steps in order to further isolate what you may be experiencing in your device. Find the troubleshooting steps on the provided link http://www.samsung.com/in/support/skp/faq/1119803. Please let us know what steps you have taken and if you have noticed any changes or improvements as this will help the Community to provide you further troubleshooting steps without repeating any procedure which you may have already followed. Be sure to hit ♡ when you find an answer that works for you.
For Further assistance, you can get in touch with us via Live Chat option by following- http://livechat.support.samsung.com/Customer_new/IN. You can also connect us via Samsung Members web community by following mentioned url-https://community.samsungmembers.com/en_IN#/