First you should change the option to restsrt on an error - then it will stop with a blue screen - the bluie screen details may give a clue as to what's causing the shut down.
Go to the Control Panel - Double click on System - Choose the Advanced tab - Click the Settings button for Start up and Recovery - untick the box "Automatically restart...."
Also you should cherck the fans and system temperatures (as heat related issues are common in the summer).
You can do this by downloading free Everest from
This has a temperature/fan monitor under the Sensor in the Computer section.
Also generally look inside the case for dust/fluff build-up and clean.