A bootloader is a small program that runs first when a computer or embedded device is powered on. It initializes the hardware, then loads the operating system or main application into memory and hands over execution. GRUB on PCs and U-Boot on embedded Linux systems are well-known examples.
On microcontrollers, a distinction is made between the factory bootloader that the chip maker stores in ROM and a custom bootloader that developers write into flash themselves. Custom bootloaders often handle firmware updates over an SD card, USB, or a serial link.