BrianCooper :
Thelps :
One of the quickest ways to know if your CPU is running hot is boot your computer into the Motherboard BIOS at start up (usually by spamming the 'delete' key during the first 5 seconds after power-on).
Somewhere in your Motherboard's BIOS there will be a hardware temperature monitor that includes a readout for the CPU (check your MoBo's manual for the exact location of this reading).
Check what temperature your CPU is idling at, and whether that temperature is stable or increasing at a significant rate.
Keep in mind running games can add 10-25 degrees to this number, occasionally more.
Your CPU will auto shut down at anywhere between 75 and 90 degrees celsius (this is probably also controllable via a setting in your MoBo's BIOS).
If heat is what is causing your PC's shut down, you need to reinstall the heatsink and fan assembly as it is poorly installed.
Make sure to use thermal paste between the heatsink + fan and CPU and to apply that paste carefully and in the right density. There are many guides on how to do this online.
The CPU temp in the bios Is 45 Celsius.
It doesn't seem temperature is your problem. You can try RealTemp for an in-OS temeperature readout:
http://www.techpowerup.com/realtemp/
It is also possible you perhaps have loose connectors on your motherboard. Especially the CPU 8-pin connector and the motherboard's 20-pin/24-pin connector. It is worth checking all of these.