Eventually all animals and plants die and when bacteria or fungi decompose then, the Carbon is returned to the atmosphere as Carbon Dioxide. In the carboniferous period carbon was removed from the system because in the waterlogged forests or at the bottom of the sea, it was not possible for decomposers to do their job. All this carbon was locked up as coal, gas, and oil. The amount of Carbon Dioxide in the atmosphere decreased. Nitrogen is also recycled by nature.
Plants use nitrates from the soil to make proteins.
Animals get their proteins by eating plants. Dead animals and plants release Ammonia when they are decomposed. Nitrifying bacteria in the soil convert Ammonium ions into Nitrate ions so completing the cycle. When farmers harvest their crops they effectively remove Nitrogen from the environment, so they must put it back or their crops will not grow in future years. Farmers might fertilize their fields with manure, artificial fertilizers or by rotating their crops.