How the Moon was Formed?

When the Earth and other planets were in the process of forming billions of years ago, a small body crashed into the Earth. The debris that it released went into orbit around the Earth and then bonded together because of gravitational forces to form the moon.