Nitrogen makes up 78% of the air around us, and 3.2% of our own bodies. It is the fourth most abundant element in humans, after oxygen, carbon and hydrogen. As an essential component of all proteins, it is one of the elements that makes life possible.
In air, it is mainly found in its elemental state - molecules of N2, with two nitrogen atoms that are tightly bonded together. Being tightly held together with a triple bond, they are hard to break apart, making elemental nitrogen unreactive. In contrast, nitrogen compounds are often highly reactive, mainly thanks to the electronegativity of nitrogen (its strong attraction to electrons). So nitrogen tends to go to two extremes: it can be an inert gas, or form unstable compounds, which are often strong oxidising agents.
Its role as an inert gas is actually pretty important - it's surprising how often it's useful in chemistry to have something that does nothing. We use nitrogen to fill crisp packets so that the crisps last much longer, for example, and the same goes for lots of other foods (you'll occasionally see 'packaged in a protective atmosphere' on these things). It's also very useful when you're trying to achieve a chemical process without interference from oxygen, like annealing steel.
It is nitrogen's role in amino acids which makes it so vital for living things. Amino acids are the building blocks of proteins, and proteins are the building blocks of us. They're the main structural molecules of animal life - collagen in skin and bones, keratin in hair and feathers, myosin and actin in muscles. They also perform an astonishingly wide array of other functions, including metabolism, DNA replication, cell signalling and many more. Many of the most interesting and complex biological molecules are proteins; life would be inconceivable without them.
There are at least two important properties of nitrogen that contribute to the mind-boggling versatility of proteins. First, each nitrogen atom can usually form three bonds. That allows it to sit in a chain between two carbon atoms, with a hydrogen atom attached, and chains are always a good start if you want to build anything more complicated. Second, nitrogen's electronegativity allows it to grab the lion's share of that hydrogen atom's one electron, so that it can take part in hydrogen bonding, meaning it's attracted to water and also to various other bits of any protein. The details of protein formation and folding are endlessly complex, widely considered one of the greatest classes of problems in science, so I won't dig into them much deeper than that, but hydrogen bonding is one of the main types of force involved.
Nitrogen sits in Group V (or Group 15) of the Periodic Table, the first of the bizarrely-named 'pnictogens', each of which has five electrons in its outside shell. The next pnictogen down is phosphorus, another of the elements essential for life, which in many ways is chemically similar. The biggest difference between the two is that because phosphorus atoms are bigger, they can't form triple bonds - triple bonds are short, and phosphorus is wide. So rather than nitrogen's highly stable diatomic molecules, phosphorus arranges itself into wildly unstable tetrahedral molecules. Break any one of their six bonds and the whole thing falls apart, which is why white phosphorus spontaneously ignites at around 50°C, and needs to be stored under water to keep it safe. Arsenic is the third of the pnictogens, and is toxic to almost all life because it's so chemically similar to phosphorus that it gets incorporated into biochemicals in its place, but its compounds are much less stable so they then fall apart.
Despite our atmosphere being mostly nitrogen, nitrogen compounds are a scarce resource. Only a few bacteria have the enzyme necessary to take nitrogen from the air and 'fix' it into a more reactive and hence usable form, and they can only exist in low-oxygen environments. Some of these bacteria live freely in the soil, but notably plants in the legume family (Fabaceae) have specialised root nodules for nitrogen-fixing bacteria to live in, which is why they're able to produce such large, protein-rich seeds (peas and beans), and why crop rotation often includes a phase where fields are planted with these. The roots, left in the ground when the plants are harvested, provide a valuable source of usable nitrogen for the next crop.
There are a few other naturally occurring sources of fixed nitrogen. Bacteria and archaea called azotrophs also fix nitrogen, primarily in the ocean. Lightning makes the air so hot that the nitrogen can form nitrogen oxides, which can also eventually make their way into soil in useful forms. Car engines also do this, which is a problem because nitrogen oxides are often harmful. Still, they do help plants grow.
All of these sources added together could never fix enough nitrogen to sustain a world population of 7.5 billion. Plants are nitrogen-hungry; if we were limited to the amount we can grow on naturally-fixed nitrogen, we would never be able to feed much more than 3 billion humans, maybe 4 billion if we're very clever about it. It was the invention of the Haber-Bosch process that allowed us to grow so much more food that our population could double to its current level, which probably makes this the single most important chemical reaction we've ever invented. It's also rather energy-intensive, using somewhere close to 2% of humankind's total energy output; we could make huge reductions in carbon emissions if we can perfect an alternative method, perhaps imitating nitrogen-fixing bacteria.
There are plenty of interesting things about the Haber-Bosch process, including its history and the details of the conditions it takes place in. I encourage you to read about those some other time, but for now let's just say that it takes elemental hydrogen and nitrogen, puts them under enormous pressure at quite high temperatures in the presence of an iron catalyst, and produces ammonia. Ammonia (NH3) is the rank gas that makes old pee smell like old pee, but it's also used in household cleaning products, and it's an incredibly useful feedstock for a huge range of important chemicals. Oxidise it and you get nitric acid; react it with nitric acid and you get ammonium nitrate, an extremely rich source of nitrogen for use in fertilisers, as well as a powerful oxidising agent that is widely used in industrial explosives.
I said earlier that nitrogen can usually form three bonds. Sometimes, though, it can actually form four. A molecule of ammonia or an amine group has polar covalent bonds, with the nitrogen atom poaching some of the electric charge from each of its neighbours to make itself negative. That allows it to pull in any passing hydrogen ions, which are positively charged (and which are what make acids acids). Once it's done that, something slightly odd happens, and the nitrogen atom shares an electron pair with the incoming hydrogen ion, forming a fourth covalent bond and making a ammonium ion (NH4+). Compounds with the ability to take in hydrogen ions are basic by definition, and nitrogen-containing ones are known as alkaloids. Ammonium ions are the most important exception to the rule that all positive ions apart from hydrogen come from metals, and like other positive ions it takes part in ionic bonding to form salts like ammonium chloride and ammonium sulfate, almost all of which are soluble.
Humans have of course been surrounded by nitrogen for as long as we have existed, but it was only isolated in 1772, by a Scottish student named Daniel Rutherford. Even then he called it 'phlogisticated air', believing that it extinguished candles and suffocated mice because it was already saturated with phlogiston, so it couldn't take any more. To make it he burnt things in air until they wouldn't burn any more, and then extracted the carbon dioxide (or 'fixed air') by bubbling it through a solution. These days we use fractional distillation to extract 45 million tonnes of nitrogen from the air every year, chilling it until it forms a liquid and then separating each component depending on its boiling point. It's a simple process, and we are not going to run out of its raw material any time soon.