I'm trying to understand what happens when a computer is turned on. How the computer works on startup, various initializations that take place, etc. For example, is the bootstrap loader the first step? When are device drivers loaded?
The startup/boot sequence varies somewhat between different operating systems (although the early steps are generally common).
Also providing any sufficiently detailled description of the boot sequence is well beyond the scope of an SO answer. I'd rather refer you to the following links
First, the hardware in your motherboard does a basic check to make sure the minumum number of components is present such as RAM, video out, hard drive, keyboard, mouse etc.
This is why your keyboard flashes when you boot your computer. Then, the program embedded in the motherboard finds the boot sector of your hard drive, and looks for an operating system there.
If it finds it, then it passes control to the operating system, which then begins to load itself into memory, and do things like load device drivers and such.
If you are interested in the steps the operating system is taking, you can press F8(assuming Windows here) while your computer is booting, and that will give you some options for booting. I believe one of the options will let you see what the OS is doing step by step in its load.
Windows comes with a utility called msconfig which allows you to see all of the things that the OS loads.
Google's Chromium OS Fast Boot goes over boot sequence from a traditional operating system. Though if you want specifics we'd have to know the operating system.
In summary following things happen
- Turn on the Power button
- CPU pins are reset and registers are set to specific value.
- CPU jump to address of BIOS (0xFFFF0).
- BIOS run POST (Power-On Self Test) and other necessary checks.
- BIOS jumps to MBR(Master Boot Record).
- Primary Bootloader runs from MBR and jumps to Secondary Bootloader.
- Secondary Bootloaders loads Operating System.