See the following thread:

The most likely culprit is your Graphics Card or Driver. Usually if this is the case you will get an error message when you force a reboot of the PC.

Other possibilities are HDD locking up due to heat or defective / faulty motherboard capacitors around the onboard graphics/chipset/processor etc...

I would start with a spring clean of your case, get rid of the dust bunnies and reseat your RAM and check all your connectors are all connected properly. Check that all your fans are spinning up and pushing/sucking the right way. While you are in there have a look for any obvious leaking or bulging capacitors.

Then check/update the graphics drivers and then check/test/replace hardware as these are the easiest to illiminate.

Then borrow or use a spare HDD to rule this out if the problem still persists.

If the problem still persists then my next step would be to check your power supply as it can be a factor whilst less likely and is less expensive to replace than your motherboard. (You would hate to replace a motherboard only to find out that the problem was a less expensive piece such as your Power Supply)

Replacing bits piece at a time won't necessarily find your problem. I have this problem on 2 computers - 1 I get an error message indicating that my graphics card is having issues with the drivers or is faulty. The other I have replaced everything above + some and am left with only the motherboard and processor unreplaced and still have the problem more and more frequently.

A tech may be able to diagnose your problem without replacing everything however beware of techs who just tell you to replace the motherboard and then go ahead and try and fix your problem and charge you through the roof for their effort and return the PC in the same condition.

I hope this helps in some way to get you started troubleshooting your problem.

I am sure others will come in with their own experiences and perhaps a little different advice. All advice is good advice.