I had read somewhere it came for the Pacific ocean after the earth spit it out but I guess and its just a guess it formed when everything else did. I wasn't there and neither was anyone else so no one can say for certain just like the Pyramids. it's all a guess. Occam's razor
The leading theory is that very early (3.5-4 billion years ago), there was a collision between the Earth and an asteroid/planet about the size of Mars. This melted both and flung off debris, with later consolidated and became the moon, and the Earth was much larger. This explains the fact that the moon is mostly the same or very similar in mineral content to the Earth, and that the moon is "differentiated", i.e. has layers of dense to light material, and a metallic core (which may or may not still be molten to some degree). If you melt everything the heavy stuff sinks to the bottom naturally. This didn't dig out the pacific ocean basin, it's relatively new (seafloor spreading), as are continents. The collision more-or-less melted everything, causing the differentiation.
The theory that it formed by accretion with the Earth is still held by some, possibly still including Jack Schmitt, the only scientist to go to the moon, as LM pilot on Apollo 17.
If you are interested:
http://en.wikipedia.org/wiki/Origin_of_the_Moon I learned something today, that there is a theory that proposes a "georeactor" explosion flung it off. A "georeactor" is a *naturally occurring* nuclear reactor, that is, enough fissionable material (U235 in this case) somehow reached a high enough concentration and an acceptable geometry and moderation to start a fission reaction spontaneously. This seems quite crazy, however, it did happen. In distant times (again, 4ish billion years ago) the concentration of U235 (as opposed to U238, which cannot spontaneously form a chain reaction) was high enough that it was possible. They have found a few semi-stable reactors in ancient rocks in South Africa, as I recall. They could tell because the fission products were present at abnormal levels. In this theory, a far bigger reactor actually blew up in a runaway chain reaction, blowing off bits to form the moon. It couldn't happen today because most of the U235 has decayed to be either stable or non-fissionable.
You may not know this, either - the Earth's core is hot partly because it hasn't cooled off yet, and partially because radioactive materials are decay at a high enough rate to keep it from cooling off.
I objected to the infamous Chuckie calling everybody liars, when he himself doesn't have the slightest notion whether what they say might be true, or not.
Brett