A spontaneous reboot often means your computer is tossing a Blue Screen of Death but is set to not display it. BSODs are generally caused by hardware or driver problems, and the error message it shows can help pin down exactly what the issue is.
To have your computer display BSODs instead of rebooting immediately, go to Control Panel->System Properties->Advanced Tab->Startup and Recovery Settings and uncheck 'automatically restart'.
The next time it crashes, you may get a BSOD similar to the one below (not all highlighted parts may be present):

Write down the information in the highlighted areas before turning your computer off. The information there can then be researched online to see if others have experienced similar problems, and what the cause was. You may also get a 'windows has recovered from a serious error' message when you turn your computer back on--if you do this, you should agree to send the report to microsoft. You'll then be forwarded to information about that error on Microsoft's knowledgebase, if they have any.