If you can power off the phone then you can do a system cache clear which may help. If that doesn't, the next step would be a factory reset, again from a power off state. If those don't work then you most likely have a hardware problem.
To clear system cache:
Power off the Galaxy S3, and then simultaneously press and hold the “Volume Up-Home-Power” keys. When you feel the phone vibrate, release the “Power” button to view the Android Recovery menu. Select the “Wipe Cache Partition” option in the Recovery menu, and then reboot the device. All cache files are deleted at once.