My guess (this is not a typical problem) would be that your Windows installation is somehow damaged or that you have bad hardware. Does it ever restart when you do anything else?
I'd suggest that you start by
turning off the "restart automatically" option to see whether you are getting BSODs ("blue screens of death") and what they say. On the hardware front, you can download and run
Memtest86.
Ultimately, unless you find hardware problems, you are probably going to want to
re-install Windows.