The majestic oceans of planet Earth were formed neither quickly nor simply. It took literally millions of years between the first surface water’s appearance and the creation of the primordial sea.
Several factors contributed to this: the gradual cooling of the Earth was the first and most important, but also important was the slow release of water from existing minerals, the condensation of steam, and even the addition of water in the form of ice from occasional cometary collisions with the planet.
The first waters soon became the habitat of early prokaryotes – whose biochemical processes led to the formation of still more water. Indeed, it is possible that the majority of water on the planet today exists as a result of these organisms.
As mentioned in:
The Big Bang Theory — Barenaked Ladies