There a number of possibilities, check this
thread If you are using xp, there is an option that causes windows to reboot on an error. I dont use xp, but other posters have said go to your system properties, ( right mouse click on "My Computer" on the desktop), and then look for the tabs called "Advanced", click that and you should see a bunch of stuff to do with Startup & Recovery, click on the settings button for this, and then in the new box that opens up uncheck "Automatically Reset".