During the carbon cycle, plants remove carbon dioxide from the atmosphere to perform photosynthesis. Animals consume plants and return carbon dioxide to the atmosphere during respiration. Decomposers and detritivores also help to recycle carbon dioxide when they break down dead organic matter and release the gas into the atmosphere.

In the nitrogen cycle, nitrogen-fixing bacteria convert atmospheric nitrogen into ammonia in water and soil. Nitrifying bacteria use ammonia, turning it into nitrate and nitrite by-products. These bacteria are essential to ecosystems because they bring nitrogen into the soil for use by plants. Animals consume the plants and return nitrogen to the soil through excrement and upon death. Denitrifying bacteria return nitrogen to the atmosphere.

Phosphorous enters soil and water via runoff from phosphate-containing rocks. Similarly to the carbon and nitrogen cycles, plants utilize phosphorous, and animals consume the plants to later return phosphorous to the environment through decomposition.

Human activity alters nutrient cycles, sometimes with serious adverse effects. Phosphate- and nitrate-heavy runoff from agriculture and sewage adds far more nutrients to waterways than necessary. This addition of excess nutrients, or eutrophication, alters the species composition of water bodies and decreases biodiversity. Eutrophication causes massive algal blooms that block sunlight and rob nutrients from bottom-dwelling organisms.