According to a theory called condensation theory it is believed that the earth was formed 4.5 billion years back from the nebula, a cloud which contains gas and dust particles. It is commonly believed that the moon and earth both are made from this cloud which when condensed changes to pebbles, rocks etc. but it seems not very true because there is huge difference between the composition of moon and the earth. Moon does not have iron core like earth.
The capture theory claims that the moon is created somewhere else in the universe and was somehow captured because of the earthâ€™s gravity. It seems physically improbable and cannot explain about the similarities found in the composition of both earth and moon.
Fission theory says that the moon had originated from the earth itself and may be possibly from the Pacific Ocean and somehow managed to get separated from the earth. Earlier this theory was accepted because of the similarities between earth mantle and moon’s composition The fast spinning of earth might have cast off the moon from its outermost layers.
Another theory that is very popular these days is THE GIANT IMPACTOR THEORY which is also known as ejected ring theory says that a small planet approximately equal to the size of mars had collided with the earth right after the formation of solar system and collision has ejected a large amount of heated material from the other body. So a disk came into existence and the material in that disk starts binding itself which finally resulted in the formation of moon. This theory explains about the heated rocks present on the surface of moon. Moreover many evidences has been seen for such collisions in the solar system during its early stage.