Are you talking about after an installation, or just basically says "Screw it" for what seems to be no apparent reason?
If it is because of installations it is because of the registry changes, if it is for what seems to be no apparent reason, then some error caused this.
XP turns off certain ports autmatically, especially with your CD, or CD writer. It automatically reboots unless you tell it not too due to port issues and bios I/O problems.
To turn off the automatically reboot on error, go to:
Right click My computer
select Advanced tab
select StartUp and Recovery/Settings
then uncheck the box that says "Automatic Restart"
This may cause your system to lock up or blue screen when an error occurs, but at least you will know something went wrong.
If you are using XP Pro you should be able to check your Administrative Tools, Event Viewer, Application and double click on the last red stop sign in the viewer and read what went wrong. Also, get the Event ID: # and then:
To fix the error go to:
http://www.microsoft/technet/
and type in the Event ID: # in the search box and then read what went wrong and how to fix it.
Cheeto!