Ok,firstly Welcome to Seven Forums!
Now worst case cenario would be your cpu cooler isnt seeted well,and the cpu gets too hot too quickly,then windows shuts it down automatically to avoid any major damages, I would say check the thermal paste on your cpu,check that the cpu cooler makes perfect contact with the cpu, check that all the fans on the cpu cooler are plugged in and working ext.
Secondly,remove all the ram you have installed except for one,leave the one closest to the cpu still in its slot. Now unplug any usb flash-drives,or wi-fi devices and start up the pc,when the screen starts up,press "del" - (delete) to go into bios, check the temps of your cpu there and watch it for about a minute or two,and see if it spikes or picks up too fast. Press f10 save and exit, the pc will restart and will now boot with only the one ram you installed,if the problem is gone,replace the other dims one by one after switching off,and start again.(Pc must be switched off at the power plug,before changing ram)
Please reply with results,and also with your system specs,ie:motherboard name and make,memory type and amount of ram you have,graphics card/s...and so,basically everything in your pc.