The leading theory on the birth of our moon involves a rather violent meeting of Earth (or a slightly larger “proto-Earth,” rather) and a Mars-sized planet, Theia. Theia, named for the Greek titan who gave birth to Selene, goddess of the moon, was very likely one of countless bodies in our solar system around four and a half billion years ago- close to 100 million years after the formation of our system.
This impact was likely the last of many such impacts that involved our world in the early solar system and it is very possible that this was a direct impact, due to the even composition of the moon, including elements found in and on the Earth. This impact would have caused Theia’s iron core to sink into the Earth’s own core and much of its mantle to melt into ours. The remaining part of Earth’s and Theia’s mantle would have been flung into orbit, forming much of the ring of debris that coalesced into our moon.
With such an impact, Earth’s rotational speed and tilt would have been drastically altered, giving Earth a day that lasted as short as five hours following the collision. Following the impact, the formation of our moon would have seemed like the blink of an eye in relation to the astronomical calendar. It likely took no more than a century to form and it is possible that the moon’s coalescence happened in under a month. This is not to say every bit of debris was swept up right away. Due to the thickness of the crust of the far side of the moon, it is possible that Earth was home to a second, much smaller moon before it eventually fell into the Moon we know and love, pancaking the smaller body.
Source: Giant-impact hypothesis
Image source: NASA