Biologically: Nitrogen gas (N2) diffuses into the soil from the atmosphere, and species of bacteria convert this nitrogen to ammonium ions (NH4+), which can be used by plants. Legumes (such as clover and lupins) are often grown by farmers because they have nodules on their roots that contain nitrogen-fixing bacteria. (Learn more about this process in the article The role of clover.)
Through lightning: Lightning converts atmospheric nitrogen into ammonia and nitrate (NO3) that enter soil with rainfall.
Industrially: People have learned how to convert nitrogen gas to ammonia (NH3-) and nitrogen-rich fertilisers to supplement the amount of nitrogen fixed naturally.