Do you get an error message when the computer spontaniously restarts?
If not you need to disable it from restarting on error.
To stop the spontaneous rebooting and be able to see the bsod which has information we can use to diagnose the problem do the following:
Right click on the "My Computer" icon on your screen, then select "Properties", click the "Advanced" tab
Click "settings" in "Startup and Recovery Settings"
Then uncheck Automatically Restart
Click "Apply" and then "OK"
In your next post give us the information on the BSOD (stop message).
It should look something like this:
0x0000008E (Followed by four other sets of numbers in parenthesis.) and some other information.
Explanations for various stop errors:http://wiki.djlizard.net/STOP_errorshttp://aumha.org/win5/kbestop.htm