This sounds like a hardware problem, but before such conclusion can be drawn, we must troubleshoot the problem to avoid unnecessary replacement of hardware components.
The best place to start is by asking windows why it decided to shut down.
Most likely Windows doesn't know either (if the hardware malfunctioned, windows didn't trigger the shutdown itself)
But if Windows knows what happened, it can be of great help.
unfortunately, at this time I also don't know where exactly this information can be found. I hope other super users can point that out.
There are probably a few error logs we can look at, however I don't know which that would be or where they would be, so I hope someone else can post about that.
Now we can also troubleshoot the hardware a bit.
sometimes a computer shuts-down suddenly to prevent damage from overheating.
Often, one can set a temperature value in the BIOS at which the computer should shut down.
You could start by holding your hand next to your PC where the air is blown out, and felling if it seems unusually hot. If it does, there is a change your PC is overheating. If it feels somewhat cool, maybe the fan is not even working, or there simply is no overheating.
A more direct approach would be to download software like HW Monitor from CPUID. This software can tell you much about the temperature of your hardware and sometimes also about the fans. There is a freeware version which can do the trick.
We could also be dealing with faulty memory (RAM). You can download and install a program called memtest86+ for this (I recommend the memtest86+ over memtest86, yes there is a difference)
This software is directly installed on an empty USB flash drive. the drive is than bootable, which means you have to reboot your PC, and load the software from the flash drive to run before windows starts.
If you run memtest86+, it will simply test your memory and report any errors found (if there are any).
If your memory is indeed faulty, it most likely needs to be replaced.
this are only some random attempts to troubleshoot the problem. It is very hard to give a fitting answer to your question without more information about the problem.
You must read How to ask a good question ?
– pun – 2016-01-03T20:20:59.7802Get a can of compressed air and with the laptop powered off, try blowing into the areas of the enclosure to blow out any caked dust which may be restricting air flow. If it's clogged with dust, etc. and air cannot flow to keep it from overheating, it may power off automatically to prevent further damage to internal components. It may just be overheating and powering down due to this but more detail may be helpful as well. – Pimp Juice IT – 2016-01-03T20:21:06.063
You should probably reconsider the tone of your question if you want help. And add more details about your issue while you are at it. – Zero3 – 2016-01-03T20:21:47.163
2Second LMFAO_A_JOKE's answer--this is very likely a cooling issue. Clean out the dust, make sure all fans are spinning. (Note that with a laptop they may turn on and off based on temperature. That's not a problem.) Computers have a thermometer in them, if it goes too high the system turns off right then. Cursing an unexpected shutdown is a lot better than cursing a machine that fried itself instead of shutting down. – Loren Pechtel – 2016-01-03T21:14:39.593
1If there's no explanation why you ask for one? – larkey – 2016-01-03T21:53:26.387
1http://support.microsoft.com/kb/2028504/en-us – magicandre1981 – 2016-01-04T05:35:19.300
1Mine has this problem ... in a VMWare virtual machine. Ruling out hardware. – frumbert – 2016-09-02T00:49:23.937
@frumbert how is that possible? – ewrwr – 2016-10-09T02:17:46.053
@ewnr I second frumbert's assessment. There are several potential causes. – vapcguy – 2017-01-18T02:21:24.467