It sounds like your computer is experiencing some sort of fatal error and it shuts down because you have it set that way.
Go to System Properties -> Advanced tab, then, under Startup and Recovery, click the Settings button. In the Startup and Recovery properties windows that then comes up, under System Failure, select 1. Write an evet to the system log and 2. Send an administrative alert, and deselect Automatically restart.
This will not solve your problem, but at least it shouldn't pull the restart on you anymore and you'll be able to see a BSOD or some sort of message. My guess is that you recently installed or updated a piece of software, which caused some kind of problem with your system.
Hope this helps...