There was darkness over the surface of the waves. (Genesis 1:2)
The earth got cooler and formed volcanoes. Asteroids and comets crashed into the earth. The volcanoes, comets, and asteroids caused water to form on the earth, eventually covering the entire earth.