Generally you can try the following. If didn't work, you have to find out (google) which specific key press needed for your computer model.
HP/Compaq Recovery Instructions
Here are recovery instructions for HP/Compaq laptops.
1. Reboot, and repeatedly press F10 at the HP logo until the recovery screen appears.
2. When the recovery screen appears, press "Next" and then "Yes" to perform a non-destructive recovery.
3. To perform a destructive recovery, click "Advanced" and then "Yes".
4. After the recovery is finished, the laptop will reboot.