Free Nitrogen (N2) constitutes a large percentage of the air (78%) though its still not available to plants for direct use. Only when it is converted to a fixed form like Ammonia (NH3), can it be readily utilized by the plants. (It is to be noted here that plants use Nitrogen for growth and metabolism).
There are several bacteria - known as the “Symbiotic” bacteria or the Nitrogen-fixing bacteria – that form symbiotic associations with some plants and perform this function of conversion of the free form of Nitrogen into the usable/fixed form – Ammonia. These reside in the root nodules (pink “bulb” like structure) of several legumes like the pea plant.
Ammonia is then converted into Nitrate, Nitrites by these bacteria, which then the plants use for creation of proteins. Examples of such N2-fixing bacteria are Rhizobium, Azotobacter etc. This process is called as biological nitrogen fixation.
They are different from the decomposing bacteria or just decomposers (also called as scavengers) whose function is to decompose dead organisms (both plants and animals) and return the macro and micro elements (including nitrogen) back into the atmosphere.
FYI Ammonification, De-nitrification, Decomposition etc. are all parts of the Nitrogen cycle.