This site tells the story of the history of the universe. Click Earlier and Later to follow the story.
Note: Many facts have been simplified to make them easier to understand. Our new free weekly podcast Time Crystal tells this story as sci-fi fantasy
As the Earth formed out of rocky snowballs it grew hot and probably melted. One theory is that early in its history a large object hit the Earth, which threw out a shower of rocks. These collected together to form the Moon. If it is true this would certainly have made the Earth melt.