Continuous volcanic eruptions contributed water vapour and gases to the atmosphere. As the earth cooled, the water vapour released started getting condensed. The carbon dioxide in the atmosphere got dissolved in rainwater and the temperature further decreased causing more condensation and more rains. The rainwater falling onto the surface got collected in the depressions to give rise to oceans. The earth’s oceans were formed within 500 million years from the formation of the earth. This tells us that the oceans are as old as 4,000 million years. Sometime around 3,800 million years ago, life began to evolve.