I had a similar issue; bought an HP Pavilion, with Windows 8 on it, and I'm wanting to use Windows 7 on it, but didn't find much help about this topic in the HP "help" pages.
They don't want you to use another system than "their" recovery system, which assures one to end up with the same config with which you start up. Which means; a pre-installed OS including a lot of HP software.
Now, this is how I did this :
To get into the BIOS, I needed to press the ESC key, during the initial boot. Note the text displayed in the bottom left corner of the screen. Do not press the F11 key, that will get you into some HP recovery menu utility.
An additional menu is displayed, where you need to use F10 to get to the next step.
When in the BIOS, go to the Boot Options page. This is in the "System Configuration" sub-menu.
Change the property "Legacy Support" from Disabled -> Enabled
Make sure "CD-ROM boot" is set to : Enabled
Then, in both the UEFI and the Legacy boot order, change the order so that "internal CD/DVD rom drive" is the first entry.
Logically, setting the option twice is one too many, and it may be obvious which one, but the above worked for me, so ..
Use the F5 and F6 keys to switch the order.
Use F10 to save.
The system will then state it has detected changes to the BIOS, and wants you to confirm (or deny that). But, in this case we obviously would approve.
This approval is done by means of repeating the 4-digit number that is displayed, and pressing ENTER.
After that, make sure that the OS install disc is in your internal drive, and press a key when asked (before the time-out is reached!).
This will lead to installing the wanted OS.
In the BIOS, there's a reference to what this BIOS considers as "legacy". Note that Windows 7 is in that list. And, Windows 8 is not.
Another note : if you bought the laptop, you've also bought a license for that OS. In fact, you should have a copy of a DVD and a serial number, but we don't do that anymore in 2014. So, no DVD to install from. And the key ? Well, you CAN get it, but you need ADDITIONAL software, from non-MS source, to get that. You're reading that correct : you need to hack your OS to retrieve your own serial number. It's their system of "protection". The thing is, it need to be done BEFORE you install another OS obviously, because afterwards, nobody will be able to recover that number. The number is stored in the BIOS. Because if is was stored in the OS, it would never survive the many crashes Windows is so famous for. So, they stored it in somethat that is stable and reliable : the BIOS. But, you cannot read it like that, no.
It seems that "UEFI" stands for a system that is only compatible to Windows 8. So, unless you want to install Windows 8 (using a DVD), you should not select any boot option that mentions "UEFI". (?)