Atmospheric nitrogen is converted to ammonia or ammonium ion by nitrogen-fixing bacteria that live in legume root nodules or in soil, or atmospheric nitrogen is converted to nitrogen oxides by lightening.
Ammonia and Ammonium are oxidized by soil bacteria first to nitrite ions and then to nitrate ions
After plants have taken up nitrogen from the soil in the form of nitrate ions, the nitrogen is passed along the food chain. When those plants and animals dies, bacteria and fungi take up and use some of the nitrogen from the plant/animal protein and other nitrogen containing molecules. The remaining nitrogen is released as ammonium ions or ammonia gas. Denitrifying bacteria convert some ammonia, nitrite, and nitrate back to nitrogen gas, which returns to the atmosphere.
Haber-Bosch Process: A technique for making ammonia from hydrogen and nitrogen, according to the first equation. To get the reactants, nitrogen gas is liquefied form air and hydrogen gas is obtained chemically from methane (natural gas). First natural gas is treated to remove sulfur-containing compounds; then the present methane is allowed to react with steam. Carbon monoxide, a product of methane reacting with steam, is converted to carbon dioxide which allows for the additional production of nitrogen gas.