A bootloader loads an operating system after hardware tests. It begins by initializing hardware and loading the BIOS. The BIOS then loads the master boot record from the disk, which loads secondary bootloaders. These load the operating system by accessing memory in both real and protected modes. The boot process involves loading kernel files and an initial ramdisk to start processes and mount the full filesystem.