The origin of the Moon is one of the more important problems for planetary geologists and in recent years, they've made giant strides in understanding how it happened. That's largely because of a much improved understanding of the Moon's composition an interior structure.
It turns out that our interplanetary companion has a similar composition to Earth, including an iron core. The consensus is that this rules out the possibility that the Moon formed elsewhere and was later captured by the Earth's gravity. Instead, it must have formed from the debris created by giant collision between the Earth and a Mars-sized body.
Astronomers believe this collision must have occurred at a slow relative velocity and a shallow angle to ensure that the debris entered orbit around Earth and stayed there, eventually forming the Moon.
Such a slow impact collision would also have preserved the angular momentum of the system too. This places an additional constraint on the bodies before impact, since they cannot have had an angular momentum much higher than the Earth-Moon system today.