Our best guess now seems to be that the Earth was struck by an interloper about the size of Mars or so, which ejected material from the Earth's crust into orbit forming a disk of gas. The Moon formed from this disk at a distance considerably less than its current distance by perhaps a factor of two. Since then, it has been slowly increasing its distance. The Moon may have been about 100 - 150,000 miles from the Earth at the outset.