The carbon cycle is the way carbon is stored and replaced on Earth. Some of the main events take hundreds of millions of years, others happen annually.
 
The main ways that carbon gets into the carbon cycle are volcanoes, and the burning of fossil fuels like coal and gas. Through most of history, volcanoes were the biggest source of carbon to the carbon cycle, but in the last hundred years, people burning fossil fuels have been adding about a hundred times more CO2 to the air than volcanoes. That is, for every ton of CO2 added to the air by volcanoes, about 100 tons of CO2 have been added to the air by people.

The main way carbon gets taken out of the atmosphere is by photosynthesis by living organisms.  Some of this gets released as they die and decompose, but a proportion gets buried in sediment.  This is shown in the diagram. Sediment turns to rock, and it is the carbonate rocks like limestone which contain the now-solid CO2.  Some of the carbon from plants also becomes part of the soil, where it can stay for a long time before decomposing.

Another process takes CO2 out of the air. Weathering by rain washes out CO2 in the form of dilute carbonic acid. This reacts with rock, helping to dissolve and destroy it. This also ends up as sediment.
"Weathering is a large consumer of the atmospheric carbon dioxide essential for dissolving rocks".

Some CO2 is also dissolved in the ocean.  Right now, the oceans are taking in more CO2 than they are releasing, every year.  However, this is making the oceans more acidic.

The store of carbon in sedimentary rock is far greater than the CO2 in the atmosphere (this is not shown in the diagram). Eventually it returns to the air as oceanic plates subduct in plate tectonics. At the margins of plate boundaries (and some other places) volcanoes form and spew out CO2. This completes the cycle.

Summary 
The carbon cycle is a process where carbon is recycled through the ecosystem. The concentration of carbon in living matter (18%) is almost 100 times greater than its concentration in the earth (0.19%). So living things extract carbon from their nonliving environment. For life to continue, this carbon must be recycled. See the diagram for a detailed look at the carbon cycle. An example of a route carbon takes in this cycle is carbon dioxide in the atmosphere is absorbed by plants and used in photosynthesis to produce sugars which the plant uses for energy. When the plant dies, it decomposes and the carbon stored in the plant will, over millions of years, form into coal (a fossil fuel). The coal is burnt and gives off carbon dioxide which goes into the atmosphere.  

At the moment, the carbon cycle, and how human activity is affecting it, is a big topic in international news. Fossil fuels are a non-renewable resource which means that they cannot be replaced easily. Our use of fossil fuels has nearly doubled every 20 years since 1900.  This release of carbon dioxide contributes to the greenhouse effect and acid rain.

The carbon cycle was discovered by Joseph Priestley and Antoine Lavoisier, and popularized by Humphry Davy.

Related pages 
 Orbiting Carbon Observatory
 water cycle
 nitrogen cycle

References 

Geochemistry