The motherboard BIOS contains the first stage bootloader, that initiate the loading of an operating system from some form of drive.
With a fully set up computer, that would normally be the hard drive (or SSD) that Windows or some other operating system is installed to.
With a new "empty" machine, you have to connect some other form of drive that contains a bootable operating system - traditionally an optical drive with an OS install disc in it, or now sometimes a bootable USB stick with the operating system installer.
Whichever it is, it has a minimal cut-down OS with just the capability to run a setup program that allows you to install the full system or run some diagnostic tools.
Basically, you turn the machine on and tap whatever key gets you into the BIOS, set the appropriate boot source for the install media, insert the DVD or plug in the USB stick, exit setup and the computer restarts, then starts loading the OS setup program (or say hit a key to confirm you want to do that, then loads setup).
With Windows, depending on the version, you normally get asked for the key near the end of the setup sequence. I believe with Win 10 you can chose to enter it later; other versions will not continue & finish the install without a valid key.
Some small quantity mass-produced machines may have windows installed but no key. That will run what MS call "Mini setup", which basically asks for your name and for you to enter a new windows key for that machine.