One of the prevailing theories on how our moon formed is called the giant impact hypothesis. In this hypothesis, the Earth collided with a Mars-sized planet called Theia early in its formation. The massive resulting impact is believed to have caused the ejection of a giant magma disk into orbit that eventually cooled and formed our moon.
A recent discovery has now cast doubt on the theory by inspecting the oxygen isotopes inside rocks gathered from the moon by the Apollo missions. There are three different isotopes of oxygen that are found on Earth, including 16O, 17O and 18O. However, the isotopes are generally different on rocks recovered from other planets and meteorites. Any rock with the same isotopes of oxygen as we find on earth are believed to have been derived from our planet. The assumption here is that if the early Earth collided with Theia, at least 40% of the magma would have had to come from Theia. Presumably, the rock left over from that impact on the moon would have different isotopes of oxygen.
However, recent studies have shown that moon rocks carry virtually the same isotopes of oxygen as rocks found on earth, leading some scientists to believe the giant impact hypothesis is incorrect. The scientists offer another possibility for the creation of the moon. They believe one possibility is that the Earth could have received a glancing blow from another large body making the earth spin very rapidly and literally slinging some of its material into space.
There are other theories, and so far the giant impact hypothesis has not been disproven. The scientists admit there's a chance that the giant impact hypothesis is correct and the presence of similar oxygen isotopes on the moon could be the result of the earth and the early moon sharing parts of their atmospheres after the impact.