I do found many of these situations on my friends computers.
Please check the following and act according to it:
- When the PC stops and restarts? Is that after showing the "Windows XP" logo or before that?
- For how many years you are using this PC?
- Did you installed any software or hardware before the problem begin to appear?
- Did the PC shutdown suddenly before the problem appears?
- If you're getting any error messages, then what was that? Is it related CMOS?
- Did you tried to remove and reinstall the CMOS Battery?
- Did you check inside the CPU for dust and check the RAM?
The Simple solution should be knowing the error message and resolving it. The most common in these situations will be the damage of CMOS Battery. So just replace the CMOS battery inside the CPU case and install a new one. CMOS batteries are simply available in any electronics store and and it is cheap and only costs around 10-20 rupees. Before buying you should check the number on the older CMOS battery.
How to do:
I think you know, what is CMOS battery, if don't just Google it as "CMOS battery pictures", you will get it. It is simple to reinstall, just tap the switch like metal, the battery will come out. Now install the newer battery by just pressing it into the same slot. Remove the dust inside the CPU case by some brushes and start your PC. Now, you would be greeted into the Windows XP desktop.
The above mentioned solution completely depends on the error message. If the error message says any other problem, then you should take different action. Please post the error message as reply here to help you more.
Thanks & Regards,
All I Can Do Is Be Me!