My best guess, if it is a desktop, is that it's running into an error and rebooting. Though I cannot guess the error, I can direct you how to stop it from rebooting. Note: This will NOT fix the error, only stop it from rebooting on error. Okay here goes:
Click [Start] and select "Settings" and then click "Control Panel." Open the "System" applet and navigate to the "Advanced" tab. Under the "Startup and Recovery" section, click the "Settings" button. Under the "System Failure" section, deselect the box next to "Automatically Restart."
Done.
If it's a laptop, that MAY fix it. Or, it could be an overheating problem, in which case, I suggest allowing maximum ventilation to the underside of the case by propping up both sides of the laptop during prolonged use. Also, you may wish to remove the keyboard and use compressed air to blow any accumulated dust away, which can impede the cooling fans.
Again, none of this fixes the error (unless it's an overheating problem).
To find the error, navigate to the Control Panel as detailed earlier. Instead of opening the "System" applet, open the "Administrative Tools" folder and open the "Event Viewer" applet. Any errors here should be listed under the "System" section with a red circle with a "X" in it. I really can't help you from here unless I know the problem, but you're free to poke around in here, as you can cause no damage. You may be able to even find the error that caused the system to reboot. After a reboot, immediately go to the Event Viewer and it should be the newest error. Open it and try to figure out what happened. Remember, Google is your best friend. Type the error in quotations and search, which searches for the phrase rather than each independent word.
Hah, probably an overkill answer, but oh well, enjoy!
Ryeguy
January 2009