The Ubuntu Wiki will give you this
What is Firmware?
Many devices have two essential software pieces that make them
function in your operating system. The first is a working driver,
which is the software that lets your system talk to the hardware. The
second is firmware, which is usually a small piece of code that is
uploaded directly to the device for it to function correctly. You can
think of the firmware as a way of programming the hardware inside the
device. In fact, in almost all cases firmware is treated like hardware
in that it's a black box; there's no accompanying source code that is
freely distributed with it.
Where Do You Get Firmware?
The firmware is usually maintained by the company that develops the
hardware device. In Windows land, firmware is usually a part of the
driver you install. It's often not seen by the user. In Linux,
firmware may be distributed from a number of sources. Some firmware
comes from the Linux kernel sources. Others that have redistribution
licenses come from upstream. Some firmware unfortunately do not have
licenses allowing free redistribution.
In Ubuntu, firmware comes from one of the following sources:
- The linux-image package (which contains the Linux kernel and licensed firmware)
- The linux-firmware package (which contains other licensed firmware)
- The linux-firmware-nonfree package in multiverse (which contains firmware that are missing redistribution licenses)
- A separate driver package
- Elsewhere (driver CD, email attachment, website)
Note that the linux-firmware-nonfree package is not installed by
default.
The firmware files are placed into /lib/firmware. If you look inside
there on your Ubuntu installation you will see hundreds of firmware
files that have been installed by these packages.
it continues, but I'd recommend reading the source - https://wiki.ubuntu.com/Kernel/Firmware