Proteins are composed of building blocks called amino acids. Plants obtain the nitrogen needed to synthesize amino acids from two major sources: nitrates present in the soil (or added as fertilizer) and ammonia generated by nitrogen-fixing bacteria living in the root nodules of certain plants.
Nitrogen comprises 78 percent of Earth's atmosphere. However, N2 gas is chemically unreactive. Animals and plants cannot use nitrogen in this form to make protein. Ultimately, plants rely on lightning strikes and nitrogen-fixing bacteria to generate nitrates and ammonia, respectively. Animals, in turn, rely on eating plants or other animals to obtain the amino acids they need to build protein.