Is it rebooting instantly with no prompts, or do you get a box that pops up with a message and a 60-second countdown?
If you're getting the countdown, you probably have a virus or some other malware. When the countdown appears, you can click Start -> Run, and type "shutdown -a" without the quotes to abort the shutdown process. From there, you can run a virus scan (I recommend
http://housecall.trendmicro.com) as well as Ad-Aware/Spybot/MS AntiSpyware. I'm guessing you do not have Service Pack 2 installed on this machine, so you should install that & all other Windows updates as well.
If it reboots with no countdown and no messages, just instantly kicks off & back on, then you are probably getting a BSOD. If this is the case, right click My Computer, choose Properties, Advanced tab, Settings button under "Startup and Recovery", and uncheck the box labeled "Automatically Restart" under the System Failure group, then click OK. If you're getting a system crash because of a BSOD, this will halt the system at the BSOD and let you see the error message.