A special type of bacteria called nitrogen-fixing bacteria to take in atmospheric nitrogen and produce ammonia (NH3).
Other bacteria use this ammonia to produce nitrates and nitrites, which are nitrogen and oxygen-containing compounds.
The nitrates and nitrites are used by plants to make amino acids which are then used to make plant proteins.
Nom Nom Nom, yummmy!
Plants are consumed by other organisms which use the plant amino acids to make their own.
Decomposers convert the nitrogen found in other organisms into ammonia and return it to the soil. A few of these type of bacteria return nitrogen to the atmosphere by a process called denitrification, however, this amount is small.