Shortly after the formation of the Earth 4,450 million years ago, it is thought that a Mars-sized planetesimal hit the Earth at an oblique angle; destroying the impactor and ejecting most of that body along with a significant portion of the Earth's felsic-rich mantle out into space. Some of this material is believed to have then coalesced into the Moon from an orbiting ring of debris.
Evidence for this impact comes from rocks collected from Apollo Moon landings which show an Oxygen isotope composition that is nearly identical to the Earth's mantle. Chemical inspection of those rocks found them to be nearly devoid of volatile and lighter elements, leading to the speculation that they formed from an unusually extreme amount of heating that boiled them off. Seismometers on the Moon have measured the size of its nickel-iron core and have found that it is much smaller than predicted under other formation scenarios such as tandem formation with the earth. A smaller core is consistent with the impact theory because this theory predicts that the moon was formed mostly from the mantle of the Earth and partly from the mantle of the impacting body and not from the core of the impacting body (it is thought that the core of the impactor sank and merged with the Earth's core).
Other than the existence of the Moon itself, the primary legacy of this event, say researchers, is the fact that the Earth does not have enough of the lighter-colored felsic and intermediate rock-types to completely cover its entire surface. Thus we have continents made from felsic rocks and ocean basins which are made of the darker-colored, heavier and more metal-rich mafic rock types. This difference in composition along with the presence of water allows for an extensively active system of plate tectonics on the Earth. Others have postulated that the axial-tilt and initial rotation of the Earth had their origin with the so-called giant impact.
The apparent improbability of a Mars-sized body hitting the Earth at exactly the correct angle to avoid completely destroying the planet, combined with the fortunate degree of axial-tilt that this event set up (thus allowing for seasons), and for making possible vigorous plate tectonics on the Earth (which is vital to the carbon cycle) has been put forward by some to explain our apparent "rareness" in the universe. This idea is called the Rare Earth hypothesis