All the stuff that flashes on your screen before Windows comes on is called the BIOS (Basic Input/Output System). BIOS has been around as long as the PC. The newest computers have what is called UEFI (Unified Extensible Firmware Interface). It sets up and checks all of the components in your computer.
You need it because your computer does a lot of stuff when it starts up. Here is a basic conversation your BIOS/UEFI has when you hit that power switch to boot up.
Oh, hey! I’m a computer. Let’s see what exists in me.
Cool! I have a CPU, Northbridge, and Southbridge.
Hey CPU! What’s your ID so I can see if we know how to talk?
OH, you’re a Intel i7? I know you, we’re good
Hey, i7, be in 64 bit mode and use your maximum frrequency
Hey Northbridge, how much memory do you have?
4GB? That’s cool.
Oh, you have PCIE slots also? What’s in them?
Oh a GPU? Does it respond to commands?
Good, Let’s use that as our video output now.
Hey Northbridge, can you check the RAM to make sure it’s good?
Hey Southbridge, what do you have?
Ooh a USB host. Any HID on it?
A keyboard and mouse? Let’s use them for input.
Ok gpu on Northbridge, let the user know everything is OK and see if he wants to change any of my settings.
Southbridge, I saw you have some ATA controllers, any drives on them?
OK drives, any of you know how to take over from here?
OK Windows drive, you can take over now.
..And then you see that familiar “Starting Windows” or whatever your computer says when the Operating System takes over.