ADB and fastboot are two different protocols. Android Debugging Bridge works in ROM or in Recovery mode, when adbd (adb daemon) is running on phone.
Fastboot is one of the most commonly used Firmware Update Protocols. It works in bootloader mode which is also called download mode or emergency download mode (EDL) by some vendors. Some devices have both modes where EDL provides more primary access as compared to fastboot. Some OEM's use different tools for firmware flashing such as ODIN, nvFlash, QPST/QFIL etc.
Bootloader mode is usually accessible by rebooting in bootloader mode from recovery or ROM, or by pressing Vol+ key when device is booting. Similarly EDL is accessible using different combinations of Vol+, Vol- and Power key.
Bootloader is one of the very first pieces of software that is loaded in booting process. GRUB is the most common one used on Linux PCs. On Android embedded devices, the most commonly used bootloader by SOC vendors is ABOOT. To know further about bootloaders, boot process and what we can do in adb/fastboot mode, have a look at given links:
- Boot Process: Android vs. Linux
- ADB & Fastboot