Okay, I see that you are confused here. Yes, where Earth got its water from has been up for debate. But that does not mean that Earth was formed from water. Even as big as the oceans may seem to you water is only about .02% of the Earth's total mass. The oceans are just a thin skin of water on the surface of the Earth. You need to remember that the Earth is a sphere of mostly solid rock that is roughly 8,000 miles in diameter. The heaviest stuff sinks to the center. The Earth's core is made from that most iron and nickel. The mantle is made of various types of iron rich silicates. And the crust is mostly lighter weight silicates. All of those are denser than water. So the water sits on top of everything, except where land sticks up above it.