Hi, J.
I hope you don't have the Blaster worm, as others have suggested. :>(
The starting point for troubleshooting startup/shutdown problems is MVP Jim
Eshelman's web page:
http://aumha.org/win5/a/shtdwnxp.php
Also, it often helps to change WinXP's setting for "what to do on system
failure" from the default "automatically restart". Go to System Properties
| Advanced | Startup and Recovery Settings and remove the check from that
box. Next time, instead of rebooting, the computer will halt with a BSOD
(Blue Screen of Death) full of codes that you can use to figure out the
problem. If you can't decipher the codes, post them here - verbatim - and
some guru (not me!) can point you in the right direction.
Unless it's a hardware problem...
RC