You can also check to see why your computer had a failure by checking the Events log for error messages.
You can see the Event Viewer by going to Run and type “eventvwr”.
First of all, when a computer keeps rebooting it can be caused by a wide range of problems, from incompatable software such as Firewalls and Antivirus software, damaged or overheating parts inside your computer or even incompatable peripherals such as printers and scanners.
To see what the error was you can change the default behavior by right clicking on “My Computer” and choosing “Properties”.
Goto the “Advanced” Tab and under “Startup and Recovery” press the “Settings” button.
My old pc(very old) runs W98SE and has almost no memory(64Mb,you can see how old it is) and I bought this new one because it happened exactly the same as is happening to you.
According to the technician:the power supply (its name is fountain? The only cure was replacing the fountain and the memory.
Lots of good advice already but one thing to try is quite simple!