Nitrogen is a very inert in its gaseous form because between atoms it forms a very strong triple bond. Nitrogen is also a very necessary chemical because all organisms need nitrogen-containing compounds to synthesise amino acids.
There are three main pathways which Nitrogen can be “fixed” from i.e. Put into a compound from which it can be easily obtained. Firstly, lightning can break apart Nitrogen molecules and allow them to bond with Oxygen, forming NO2. This is probably the way that Nitrogen was originally fixed to allow organisms to develop.
Another method is for bacteria to fix Nitrogen. Bacteria such as Rhizobium can make NH3 (ammonia) with an enzyme such as Nitrogenase. Bacteria such as these are found in "nodules" of legumous plants. The plant and the bacteria enjoy a mutually beneficial relationship whereby the plant feeds the bacteria and the bacteria produces nitrogen containing compounds for the plant.
We can also make ammonia industrially using the Haber process. This process reacts Nitrogen with Hydrogen to form ammonia. The ammonia produced in the Haber process is often used in fertilizers.
Once NH3 is formed the bacterium Nitrosomonas can form it into NO2 and the Bacterium Nitrobacter can form NO2 into NO3 if necessary. Once these compounds have served their purpose they can be returned to nitrogen gas by Bacteria such as Pseudomonas.