What is a Bootloader?
Think of your Android phone or iPhone... Once in a while the firmware on your phone needs to be updated to support new features or to fix security vulnerabilities.
The phone downloads the new firmware over WiFi or 4G. Then it restarts to install the new firmware.
Remember that firmware is just a program... A program can't possibly overwrite itself while it's running!
We solve this problem by introducing a second program... the Bootloader. When you power on your phone, the first thing it runs is the Bootloader. When the Bootloader finds a new version of the firmware that's stored on the phone, it overwrites the old firmware with the new one. Then it starts the new firmware.