If your running on XP it sounds like a system crash... XP automatically reboots when a system crash occurs. But if you want to disable the system reboot feature, follow this proceedure...
Click 'START'
Settings
Control Panel
Look for 'SYSTEM' and double left click it.
Click the 'ADVANCE' tab
Click the 'Settings' button in Startup and Recovery
In the 'Sytem Failure' section UNCHECK the 'Automatically Restart' box.
Click 'OK'
Click 'APPLY' (or OK) you might have to restart your computer for the new setting to take effect.
And that should stop the rebooting with a system crash... But note, you will probably get the Blue Screen and your system may lock up and you'll end up having to reboot anyway...
Good luck!