How did the Earth get its oceans? For that matter, how did the Earth get landmass and tectonic plate movements? Less than surprisingly, the two attributes of the planet may be inter-related.
Before the oceans were formed, favorable conditions on Earth supporting liquid water would be necessary. Of course, this would require the planet itself to be cool enough to support both the formation of water within a cooled atmosphere, and a planet that wasn't so hot as to instantly evaporate the water when it did fall. All of this would have had to happen at a time after the final cooling of the planet surface and formation of the crust. Once the crust formed and it was cool enough to hold water, standing water began to accumulate.
At this point in the early part of the planet's life, there would be no mountains or height differences in the planet. A ball of liquid cooling uniformly would have to hold its shape and not deform in massive ways without deforming the other parts of the planet or risking the integrity of the forming crust. As a result, the world's first ocean would be a single one covering the entire planet. Because residual heat would still be present, it is unlikely that there would have been much or any ice formation at the poles at this point. Yet with one ocean, no land masses, and an unbroken crust, what change happened in order to bring about the world we know today? The exact answer is unknown, but there is a theory.
The theory, whether it was an abnormally large asteroid, moon, or another planet with a similar orbit, was that an object of considerable size collided with the young Earth. The resulting impact was such that the partially cooled planet crust beneath the uniform ocean was shattered, induced tectonic currents within the planet, and that a large piece broke off from the impact (or was molten rocked forced out of the planet's opposite side) and took permanent orbit about the planet as the moon. Because of the impact the planet took the form of an imperfect sphere (as it is today) which may be the reason for its orbital wobble.
With the addition of what became the planet's landmass, the first super continent was born. Thanks to the movement of the tectonic plates, the grinding and mashing of the different forces created the varied landscapes, depths, and heights of the planet that we are used to today. Because of this, the various oceans (which are connected to each other most of the time) were formed.