If your desktop computer begins to shut down and you notice it runs really hot, you might consider doing some maintenance. It is pretty cheap to do so!
- The easiest thing to is buy compressed air to blow out the dust bunnies.
- upgrade the fans
- apply some thermal paste, I recommend Arctic Silver 5
- make sure it is not near heat sources
- make sure the back is away from any nearby walls
The usual culprits are the CPU or if you have one, the graphics card. To diagnose, you can use software like Speedfan or even the BIOS. The BIOS is a menu you can go into before Windows even loads. You can also test stress by playing a video at full screen or running a program that works the CPU at 100%. There is also software out there that will stress test such as Everest and Sandra. Hope it helps!