Atmospheric Fixation
The enormous energy of lightning breaks nitrogen molecules and enables their atoms to combine with oxygen in the air forming nitrogen oxides. These dissolve in rain, forming nitrates, that are carried to the earth.
Atmospheric nitrogen fixation probably contributes some 5– 8% of the total nitrogen fixed.
Industrial Fixation
Under great pressure, at a temperature of 600°C, and with the use of a catalyst, atmospheric nitrogen and hydrogen (usually derived from natural gas or petroleum) can be combined to form ammonia (NH3). Ammonia can be used directly as fertilizer, but most of its is further processed to urea and ammonium nitrate (NH4NO3).
Biological Fixation
The ability to fix nitrogen is found only in certain bacteria and archaea.
Some live in a symbiotic relationship with plants of the legume family (e.g., soybeans, alfalfa).
Link to a discussion of symbiotic nitrogen fixation in legumes.
Some establish symbiotic relationships with plants other than legumes (e.g., alders).
Some establish symbiotic relationships with animals, e.g., termites and "shipworms" (wood-eating bivalves).
Some nitrogen-fixing bacteria live free in the soil.
Nitrogen-fixing cyanobacteria are essential to maintaining the fertility of semi-aquatic environments like rice paddies.
Biological nitrogen fixation requires a complex set of enzymes and a huge expenditure of ATP.
Although the first stable product of the process is ammonia, this is quickly incorporated into protein and other organic nitrogen compounds.