The Earths surface was originally molten for millions of years.It was so hot Many Atmospheres just 'boiled away',into outer space.
But,evntually the Earth cooled down and then a thin crust formed over the Earth-but volcanoes still continuasly erupted.These volcanoes gave out many gases,including Carbon Dioxide(Co2) and Water Vapour.There were also small amounts of other gases.Scientists think this is hw the Earth's oceans were formed.
According to someones theory,the Early Atmosphere was mainly Carbon Dioxide,with virtually no Oxygen(O2).This is most like the atmospheres of nearby planets Mars and Venus today.
The oceans were formed when the Water vapour condensed.
A lot of the Carbon Dioxide was dissolved into the oceans.Later on,marine organisms (E.G algae,plankton, ETC.) developed.These also took in amounts of Carbon Dioxide.When they died,they were buried under sediment,and the Carbon Dioxide was 'Locked up' in the carbonate rocks.
Then,green plants evolved over the land,and they used the Carbon Dioxide and turned it into Oxygen through Photosynthesis.This caused the Oxgen level to gradually increase, giving way to large creature millions of year on,including Amphibians,Reptiles-including the Dinosaurs-and then Mammals.
This day and age,the Atmosphere is like this:
78% Nitrogen(N),21% Oxygen, and 1% other gases,including Argon (A) and Carbon Dioxide.
The Atmosphere got an Ozone layer-and the amount of Oxygen killed of much life,but let complex animals grow!
The ozone layer also stopped the Suns harmful rays reaching Earth...
Today,all us Humans use cars and factory's,and it is making the Atmosphere thicker-and the sun's rays get in,but can't get out.This makes the Earth hotter and hotter,and the Ice caps are melting-and if they do,water levels will rise,and towns near the oceans will flood-and it will be our fault.