Bootloader
A bootloader, also spelled boot loader or called bootstrap loader, is a computer program that starts a computer and then starts an operating system. If it also shows a menu with several boot choices, it is often called a boot manager.
When a computer is turned off, its software stays saved on non-volatile memory. This includes the operating system, programs, and files. When the computer is turned on, the operating system is usually not yet in random-access memory (RAM). Instead, the computer first runs a small program stored in the boot ROM. The boot ROM is a type of read-only memory (ROM). Newer versions can also use EEPROM or NOR flash. This program gets the hardware ready, such as the CPU, motherboard, memory, storage, and other devices. It also reaches the storage device, usually a block device such as NAND flash. From there, the operating system and its data can be loaded into RAM.
Some older computers worked in a simpler way. After a person or a connected device sent a start signal, the computer loaded a very small set of fixed instructions into memory. Then it began running them. These instructions usually started reading input from a device. Sometimes the operator could pick the device using switches. Other systems sent commands straight to devices that did one very simple reading job. This loaded a few boot loader instructions into memory.
Smaller computers often use methods that are less flexible but more automatic. In many desktop computers, starting up begins with the CPU running software stored in ROM. One example is the BIOS (basic input output system) of an IBM PC or an IBM PC compatible. This software is found at a set address. Some CPUs, including the Intel x86 series, are built to run it right after a reset, without outside help. The software can look for devices that can help start the computer. It then loads a small program from a special area, most commonly the boot sector, of the best device found. It usually begins at a fixed entry point, such as the start of that sector.
First-stage boot loader
Some examples of first-stage bootloaders are BIOS, UEFI, coreboot, Libreboot, and Das U-Boot. A first-stage bootloader gets the computer's main parts ready to work. These include the processor, the motherboard, the memory, the storage, and the devices used for input and output.
Second-stage boot loader
Second-stage boot loaders, such as GNU GRUB, rEFInd, BOOTMGR, Syslinux, and NTLDR, are not operating systems themselves. They load an operating system and then hand control over to it. The operating system starts itself up and may load extra device drivers. These loaders can show a menu where users pick options and change settings. They also load the kernel and can work with initrd/initramfs images.
The menu can offer different operating systems, which is useful for dual or multi-booting from different partitions or drives. It can also offer different versions of the same system, or a safe mode. It may include separate programs such as memtest86+, a basic shell, or games (see List of PC booter games). Some boot loaders load other boot loaders. For example, GRUB loads BOOTMGR instead of loading Windows directly. Usually one choice is already selected by default. The computer waits a short time so the user can press a key to change it. If no key is pressed, the default starts on its own.
Examples
On x86 computers, the BIOS runs a Power-On Self Test and then starts the first-stage bootloader. This small program is only 512 bytes. It sits in the master boot record and runs in 16-bit real mode. It must find the second-stage bootloader while staying within strict size limits. This leaves little room for the partition table and boot signature in the master boot record. Its code must also work on the original Intel 8088 and Intel 8086 processors. Some disks use FAT file system support. Computers may read disks using CHS or logical block addressing. Second-stage bootloaders, such as PBR, have more room to work. Third-stage bootloaders include IO.SYS, NTLDR, BOOTMGR, and GRUB. UEFI systems do not use boot sectors. Instead, they load the next bootloader, such as BOOTMGR or GRUB2, from the EFI System Partition.
On IBM System/360 and its later versions, the LOAD operator control starts a process called Initial Program Load. The computer restarts, reads a small starting record from the device, and then loads the starting program. The operating systems for System/360 through z/Architecture are stored on direct access storage devices, such as disks and drums. For OS/360, the starting program gets the system ready. It loads the core part of the operating system, called the Nucleus. Then it hands control to the Nucleus Initialization Program.
Embedded and multi-stage boot loaders
Many embedded systems need to start working right away. For example, people do not want to wait a minute for a digital television or a GPS navigation device to turn on. Because of this, these devices keep their software in ROM or flash memory, so they can start working quickly. Little or no loading is needed, because the loading is planned ahead of time and stored in the ROM when the device is made.
Large and complex systems may start up in several steps. The boot loader loads the operating system and other programs until they are ready to run. The boot loader might load the operating system, set itself up as a simple process inside it, and then hand control over to the operating system. After that, the boot loader finishes like any other program. Some boot loaders, such as Das U-Boot and iBoot, have both first-stage and second-stage boot functions.
Network booting
Main article: Network booting
Most computers can also boot over a computer network. In this case, the operating system is stored on a server. Parts of it are sent to the computer using a simple method, such as the Trivial File Transfer Protocol (TFTP). Once those parts arrive, the operating system takes over the starting process.
Network booting starts with basic network tools built into the network card's boot ROM. This usually holds a Preboot Execution Environment (PXE) image. At first, no drivers are needed, but the computer can only do a few simple things. Later, the main part of the operating system and its drivers are sent and started. Because of this, it is possible to start up an operating system that cannot use the network card by itself.

Quiz time!
4 questions about Bootloader
What is a bootloader's main job?
Pictures
Keep exploring
This article is a child-friendly adaptation of the Wikipedia article on Bootloader, available under CC BY-SA 4.0.
Images from Wikimedia Commons. Tap any image to view credits and license.