Water arrived on the earth very gradually over billions of years as ice-covered asteroids and meteors got pulled in by earth's gravity and struck the surface. The ice was vaporized into steam, which was trapped in our atmosphere by earth's gravity. A few drops, here and there, for billions of years, and it really starts to add up.
They say it came on comets and astroids, over billions of years of bombardment. The part of space where comets originate is filled with billions of objects made of frozen water ice, and dirt. They are referred to as dirty I c e balls.