Carbon is one of the most important elements for life on earth. The chemicals that make up organisms are made out of carbon compounds. This is also how organisms store and release energy.
The air has a chemical in it called carbon dioxide. Carbon dioxide is breathed in by green plants that turn it, along with water, into sugars.
Animals breathe in oxygen that gets combined with the food they eat to produce energy and carbon dioxide. This carbon dioxide is then breathed-in by plants, once again completing the cycle.
Carbon dioxide also transfers in and out of the ocean, this is called the air-sea exchange. Carbon tends to sink deep into the ocean. This allows the ocean to absorb carbon dioxide.
Both oxygen and carbon dioxide are dissolved into ocean water. Carbon from the debris eventually become limestone at the bottom of the ocean.