The oceans are thought to have started forming around 4.4 billion years ago, give or take a couple of hundred million years. At that time, the Earth was a very different place from what it is today. It was much hotter, for one thing, and it was also being bombarded by huge chunks of rock and dust left over from the solar system’s formation. Under these conditions, it’s thought that the first oceans were probably more like soupy mixtures of water and mud than the vast bodies of water we know today.
Gradually, over a few hundred million years, the Earth cooled down, and the rock and dust settled out, leaving behind a world that was more or less like the one we live in today. At that point, the oceans began to take on their familiar form, with large areas of open water separated by continents.
It’s worth noting that the oceans we see today are not the same as those of 4.4 billion years ago. They’ve gone through many changes in the intervening time and will go through many more in the future. Still, the basic outline of the oceans has remained pretty constant throughout Earth’s history, and they continue to play a vital role in our planet’s climate and ecology.