Earth was formed after the Big Bang Theory. The rocks in space collided together to form into a planet size ball. Flash Forward to a years and years later, the earth is producing its own water and storms. it also produces its own nature (trees, grass, organisms, etc.).
Hope this helped