You may think the majority of Earth's atmosphere is made up of oxygen, but no, most of it is made from nitrogen. Flora and fauna both need it (it's an essential ingredient to DNA, RNA, and proteins), but they can't use atmospheric nitrogen, so some things need to happen first.
Nitrogen fixation is when bacteria and other decomposers break down dead things and release ammonia into the soil. However, plants and animals still can't use this type of nitrogen. This can also be caused by high-energy natural phomena.
These bacteria then hand this ammonia off to other bacteria. These do step 1 of nitrification where ammonia is turned into nitrites. They then give this to other bacteria which do step 2, turning it into nitrate.
These nitrites are what can be used by animals and plants to create the things they need to live like DNA, RNA, and proteins.
Denitrification is where a yet another type of bacteria turns nitrites back into atmospheric nitrogen, removing it from the ecosystem.