Hi,
Can you run Windows or are you in a Power On Self Test temperature error loop?
Excessive CPU, graphics card, or VRM (comprised of MOSFETS, chokes, or capacitors, or the PWM controller), or PCH temperatures will elicit this behavior.
Are all fans running when you start the PC?
It could be a MB thermistor problem, a bad fan, replace the TIM on the CPU or GPU, replace the CPU cooler, or a component problem that cannot be fixed without replacing the MB.
There are temperature/fan sensors that will shut down the PC if a temperature parameter error or a fan failure occurs. This is all I can tell you based upon the information you are providing.
Contact HP Support (Link) if in warranty or a local PC tech if you cannot isolate the cause.
Regards