Welcome to Android Central! Can you give us more of a context? How often is it happening? Does it seem to be associated with a particular app or function? Does the phoen heat up excessively? Any problems with battery charging lately?
First, try booting into Recovery Mode and wiping the system cache partition, which won't erase any personal data:
http://forums.androidcentral.com/sa...ing-into-recovery-mode-galaxy-s2-s3-tab2.html
If that doesn't help, then try unmounting the SD card (
Settings>Storage), removing it, and rebooting again. Corrupt SD cards can cause problems.
If that doesn't help, try booting into Safe Mode, which disables all 3rd party apps. If the problem stops, then it's likely that something you installed is causing problems. The tricky part is figuring out which app--you may have to uninstall apps one by one until the behavior stops. Instructions for Safe Mode at the bottom of this article:
Reset: Samsung Galaxy S III | T-Mobile Support