PC randomly switches off

So my relatevly new pc of almost 1 year has recently been freezing and switching off for unknown reasons. If you know how to fix this please comment can i really need some help with this.
specs:
GPU: GeForce GTX 760, CPU: IntelCore i5-4670 3.40 GHz, MEMORY: Avexir 2x4 GB, STORAGE: Seagate 1tb
PSU Corsair CX600m

Could use a little more detail...

Does it freeze and stay frozen? Freeze for a second then shut off?

Could be the CPU overheating and the motherboard shutting off to protect the CPU.

Could also be the PSU going bad.

smelllllllllllllllllssssssssssssssssssssssss like your PSU is cooking!!!!!!!

or that cheap RAM

usually* cpu OC failer causes blue screen, usually....

It freezes stays frozen and the goes black. The cpu fan is working fine i believe its currently working at 28 degrees so it might just be the psu.

From the information you have provided, it could be practically anything. I would do the lazy thing first and just run a memtest. You can get the free version of memtest 86 here.

If the system does the exact same thing before giving any errors I would swap the power supply. If you get errors, try switching RAM. If it works perfectly start looking at hard drive or software issues.

Also it would be interesting to know if it freezes when you do certain things. like while youre playing games or is it just random?

Does Windows show the ''Windows has Shutdown unexpectedly'' or something along those lines. If so show us what error it was and we may be able to find a conclusion to it.

no nothing it just goes black

1.) First thing I'd do is boot the machine, enter the bios(UEFI) settings menu and "LOAD OPTIMIZED DEFAULTS" this will remove any overclock you may have set and should default RAM to a stable frequency. Re-boot the PC and see if issue remains.
2.) Disconnect any and all peripherals attached to the system with the exception of monitor, mouse and keyboard.
This includes opening the case and disconnect any front panel USB's, Firewire, or audio. You can leave the power and led connection plugged into the motherboard. Re-Boot the PC and see if issue remains.
3.) Remove both RAM modules and re-insert them verifying you get a proper "click" when the clips lock the RAM module into place. Remove and re-seat the video card. Re-Boot and test.
If the issue still remains, boot with ONLY 1 RAM module at a time. (aka RAM stick 1 slot 1 - test then move onto RAM stick 2 slot 1 etc etc. until you have checked both sticks in all slots.) (**some motherboard want you to use a specific slot if only running one stick - look at your manual for direction there)
4.) If the issue still remains at this point I'd swap the power supply with a KNOWN good power supply and re-test.
5.) If all the above fails and the PC is still freezing, then remove the CPU cooler and re-seat the CPU, clean off old thermal paste and re-apply new paste, then re-install the cooler verifying that everything is installed correctly. Re-test.
Lastly if all the above troubleshooting fails and the issue remains most likely it is a motherboard issue and you should seek warranty service from the manufacturer.
Hope this helps.
The more procedural you are with the the easier it is to narrow down the cause.

Carl

What is your MB