WinXP, when it encounters a fatal error, is designed to reboot instead of
giving the loathsome BSOD. You can disable the Automatically Restart
function but by doing this you will then get an honest-to-goodness error
message with which you will have to deal. You may not want to do that.
However, if you ever hope to actually cure the problem that is not letting
windows shut down then you'll have to do the following:
Click on Start/Control Panel/double-click the System Icon/click the Advanced
Tab/click the Settings Button in the Startup and Recovery Section/uncheck
the box named Automatically Restart/click OK/click Apply if necessary/click
OK/It may tell you that you have to reboot. Do so but be ready for an error
message instead of the rebooting.
If that works maybe you can come back and tell us what the error message is
and we might be able to help you with that.