The common way to work this at the shop is to look over the PC for issues like a PSU too small or bad choice, BAD CAPS (see google) and then if these are fine move on to making the PC smaller.
Here you supplied the symptom but no PC details. If it's running then supply a Web Speccy along with the make and model of the power supply.
Read how at https://www.piriform.com/docs/speccy/using-speccy/publishing-a-speccy-profile-to-the-web
My PC froze and I had to shut it down. After pressing the start button on the front panel it lit up, as well as the red motherboard lights and fans inside. Then it shut down and does this again and again indefinitely. I pulled the plug out and plugged it in again, then it worked fine again. This problem has happened 2 times as of now. Sometimes my keyboard remains lit all the time during this constant restarting but my screen remains black.
I got a new CPU not too long ago, only changed the CPU, nothing else and used ESD protection and common sense.
I'm not familiar of what issues occur when different parts fail and would like to know if this sounds like a hardware issue and possible solutions. I deeply hope the new CPU ain't the problem. Could RAM, PSU or motherboard issues cause this? Thanks for answers.
Specs
Windows 10 Home 64-bit
CPU
Intel Core i7 7700K @ 4.20GHz (Previously i5 7600k)
Kaby Lake 14nm Technology
RAM
16.0GB Dual-Channel Unknown @ 1067MHz (15-15-15-36)
Motherboard
MSI Z270 GAMING PRO (MS-7A59) (U3E1)
Graphics
S24C450 (1920x1080@60Hz)
4095MB NVIDIA GeForce GTX 1070 (MSI)
Storage
232GB Western Digital WDC WDS250G1B0A-00H9H0 (SATA (SSD))
931GB Western Digital WDC WD10EZEX-08WN4A0 (SATA )
Optical Drives
No optical disk drives detected (lugged out because it was noisy and not needed)
Audio
NVIDIA Virtual Audio Device (Wave Extensible) (WDM)
PSU be quiet! Pure Power 10 600W CM

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic