Boot into Safe Mode if you can by holding the power button to turn it off and let it cool down for fifteen minutes. Then hold the SHIFT button down and turn on the Macbook and keep the SHIFT button held down until you see the Apple logo and progress bar. Only then should you release it.
If the computer boots into Safe Mode, you should be able to troubleshoot why your Mac has been rebooting. Did you install a piece of software just prior to this that is causing this issue? I had an App called Better Touch Tool that kept rebooting my Mac and causing all sorts of problems. Once I removed it, all those problems went away. You may have a rogue app like this that is causing the problem.