The cycle by which the element carbon is exchanged between organic matter and the earth's physical environment.