Industrial agriculture is highly dependent on a ready supply of labile nitrogen fertilizer for high yields. Roughly half of all the nitrogen used in agriculture is in the form of ammonia (NH3) synthesized using the Haber-Bosch process. In this process, atmospheric nitrogen in the form of N2 gas is mixed with hydrogen gas at high temperature (500 oC) and pressure (200 atm) in the presence of an iron catalyst. That's 500 oC and 200 atm. Very hot and very high pressure.
Bacteria (and archaea) are also capable of converting nitrogen gas to ammonium (often referred to as 'fixing nitrogen') but they do it at normal temperatures and under 1 atmosphere of pressure. In these organisms the process is also energy intensive but the energy is supplied in the form of ATP and the catalyst is an enzyme complex containing 2 proteins, dinitrogenase and dinitrigenase reductase. This capacity is found in both bacteria and archaea in diverse environments including the root nodules of so called nitrogen fixing plants such as clover and soy. Bacteria, not the plants, fix the nitrogen.
There are many blog worthy aspects of microbial nitrogen fixation. I have created a label for this topic and intend to explore some of them here in the future.