·Do you remember making any hardware or software issued prior to having this issue on your computer?
·Is this a Laptop or a Desktop?
Here are the reasons that the computer can Shut down unexpectedly:
a. One of the devices on the computer is malfunctioning and does not have updated drivers.
b. Overheating of your computer.
c. Incorrect or insufficient Power Supply.
Here are the steps you can follow to figure out what could be causing the issue.
Check event viewer:
If this is caused by computer crashing and Stop errors on your computer, I suggest that you check the Event viewer to find the faulty module that is causing the computer to crash.
1. Open Start menu and type Event Viewer in the Start menu search bar. Open Event Viewer from the menu.
2. In the Event Viewer window Click on Windows Logs in the left panel
3. Click on Application Logs under Windows Logs
4. Locate error messages listed in the Central panel of the Event Viewer window and double click the error to analyze it. http://windows.microsoft.com/en-us/windows-vista/Open-Event-Viewer
Check if the computer is shutting down by overheating:
I suggest that you check if the CPU Fan is operating correct or stopped working as it could cause the computer to overheat. You can use the ‘Performance monitor’ tool to check if this is caused by overheating:
To start Performance Monitor
1. Click Start, click in the Start Search box, type perfmon, and press ENTER.
2. In the navigation tree, expand Monitoring Tools, and then click Performance Monitor.
Check out this article for more information on this: