First, do this: Right Click on “My Computer” and goto “Properties”. Then goto the “Advanced” tab and under the headline “Startup and Recovery”, press the “Settings” button. Untick the “Automatically Restart” box and press Ok.
That will keep it from rebooting on system failure.
Secondly, it could b several things causing a BSOD. Power Supply, Hard Drive, Memory, Motherboard, one of your peripheral cards, or even a corrupted OS or game. You're going to need to isolate to what is causing the BSOD. Your Blue Screen should give you some hex numbers. You can research them on the web.