Your computer is probably doing that because it experiences an error and automatically restarts, which is a feature of Windows XP (I assume you're using that.)
Do the following:
1. Right-click on My Computer.
2. Click Properties
3. Click the Advanced tab
4. Under "Startup and Recovery" click on Settings.
5. Under "System Failure," go ahead and uncheck the automatic restart box.
Then try shutting down. See if you get any error messages or reports. If this doesn't work, come back and I have a few other things you can try.
Chris