While carbon is the fourth most common element in our solar system, exceeded only by hydrogen, helium and oxygen, it is but a tiny fraction of the elements on Earth, which is composed primarily of iron (more than 32%), oxygen, silicon, magnesium and sulfur (among less abundant elements). Of course, hydrogen and oxygen (the components of water) dominate the oceans and nitrogen and oxygen comprise 99% of our atmosphere; despite its growing impact on our climate, carbon (in carbon dioxide) is but a small fraction of the atmosphere. On Earth, graphite and diamond are the naturally occurring compounds composed purely of carbon.
Despite the fact that carbon comprises a very small fraction of the elements on Earth, it accounts for almost 20% of the mass of living organisms. Able to bind with up to four other atoms, carbon forms strong bonds with hydrogen, oxygen, nitrogen, sulfur and other carbon atoms and is capable of forming double or triple bonds with many elements. Carbon thus forms chains and lattice structures that support the chemistry of life, including carbohydrates, lipids, proteins and nucleic acids. Indeed, life would not have evolved without the presence of this element.
Mention carbon and most of us think of coal and other hydrocarbons. Of course, these fossil fuels are remnants of terrestrial plants and marine plankton that lived 200-350 million years ago; depending on its age and the conditions under which it formed, coal is 75-98% carbon. In like manor, limestones and dolomites are composed of calcium and magnesium carbonates (respectively) that originally formed in oceans or shallow seas from the degradation of shells and marine organisms. On Earth, the great majority of carbon exists within living plants and animals or within the products of their demise.