Um. Wow. Ineverknew.
Short version: 4.5 billion years ago a planet the size of Mars slammed into a primordial Earth, peeling it like an orange.
It throws up huge masses of debris which form a debris ring around the Earth. Eventually that debris ring coalesces into our moon, while the core of Theia – that planet what suckerpunched us – sinks to the center of Earth. Where it still remains.
10 million years later, a smaller moon hit our Moon in a slow-motion impact that splatted the smaller planet over the surface of the moon, in a molten fireball.
There’s more here, which you should click to because someone drew some really killer art to illustrate the whole thing.
We can also trot out one of my favorite videos, a Discovery simulation of an asteroid hitting the earth, set to Pink Floyd’s “The Great Gig In The Sky”. There’s also an HD version on YouTube, but the music has been muted.
UPDATE from my friend Alex: One thing the io9 article glossed over, the core of Theia sinking/merging with Earth’s gave Earth a very strong magnetic field. That protects us from all sorts of radiation and violent solar flares. Which allows our DNA to not get scrambled whenever the sun burps. In other words, this collision may be the only reason multicellular life was able to thrive on Earth.