There are several theories as to how the Moon formed.
Most scientists believe that about 4.5 billion years ago, a small planetary body smacked into Earth. At the time, our planet was still young—just 100 million years old! The collision threw pieces of debris into orbit, which then joined together and became the Moon. Both Earth and the Moon spent the next 700 million years under siege from giant meteorites. Earth’s scars from that time have mostly healed, thanks to weather, erosion, and plant life. But the Moon still bears huge pockmarks, which we call craters.
The last stage in the Moon’s formation happened over the next 2 billion years. Molten lava seeped up from below the surface, forming dark areas called maria (MA-ree-uh), or seas. As this activity decreased, the Moon’s surface hardened into the grayish-green crust we see today.