During the first billion years of the earth, scientists believe there was intense volcanic activity that released the gases of the atmosphere, one of which being water vapour. As the earth cooled, the water vapour condensed to form the oceans. The volcanoes had also released huge amounts of carbon dioxide.