Moon was formed about 4.5 billion years ago. Mars like object named Theia hit Earth
A mars like object hit the Earth and outer layers were thrown out into space,..Along with the debris from the object which hit Earth the debris formed Moon around Earth. The collision theory
picture credit slideshare.net.