The Earth is 4.5 – 4.6 billion years old. At first, it contained large amounts of H and He gases. Most of these gases escaped into space.
Approximately 3.5 – 4 b.y.a. the Earth began to cool down and water vapor condensed into liquid water. Liquid water began to collect on the earth’s surface in lakes and oceans. The amount of water vapor in the atmosphere decreased. The atmosphere was about 70% carbon dioxide gas and 30% nitrogen gas.
The animals started to help...
Carbon Dioxide + Water -> Sugar + Oxygen
A lot of carbon dioxide gas was absorbed by the oceans by about 3.5 billion years ago. This reduced the amount of carbon dioxide in the atmosphere to about 20%.
Then the plants started to help...
High in the atmosphere, some oxygen (O2) molecules absorbed energy from the Sun's ultraviolet (UV) rays and split to form single oxygen atoms. These atoms combining with remaining oxygen (O2) to form ozone (O3) molecules, which are very effective at absorbing UV rays. The thin layer of ozone that surrounds Earth acts as a shield, protecting the planet from irradiation by UV light. The shield is believed to have been in existence 600 million years ago.
About a billion years ago, some living organisms began to use energy from sunlight to turn carbon dioxide gas and water into sugar and oxygen gas (a process called photosynthesis). The amount of carbon dioxide gas was about 15%, but it began to decrease. The amount of oxygen gas was less than 1%, but it began to grown because of the oxygen produced by living organisms.
The first land plants appeared on the earth about 400-500 million years ago. The plants took in carbon dioxide and produced oxygen gas through photosynthesis. The amount of oxygen gas in the atmosphere continued to increase, approaching 21%.