We call that a "boot-loop"
in our biz. You need to interrupt the bootup prior to it attempting to boot into W10 (or W7) using the <F10>
key on your keyboard. This should be done as soon as you see the Compaq or HP-Compaq logo immediately after you power-on your PC. (We call this screen with the manufacturer's logo the "splash-screen"
If you can't do that, it's quite possible you have faulty hardware and will either need to test it yourself, or take it to a licensed computer tech at your local repair shop. If you wish to test it yourself, have a look at this post here: Windows 10 stuck at 32% upgrade
Specifically, have a look at my POST #28
, on the 2nd page of posts, I describe some things you can attempt before you take it to a professional Tech.
Bear in mind, that if you CANNOT
get into your PCs BIOS, then your Motherboard or Hard Drive, or even your keyboard may have surrepititiously failed and each or all must be replaced!!
Best of luck to you, <<<BIGBEARJEDI>>>