The craters on the Moon were formed by objects from outer space, such as asteroids or comets, hitting the surface. The Moon has no atmosphere, so even a small rock can create a crater. When an object hits the surface, it has so much energy that it liquefies the surface and ejects some material into space. Since the Moon has no atmosphere, the material just flies out and lands some distance away from the initial collision. The circular shape of the craters is due to material flying out in all directions as a result of the explosion upon impact, not a result of the impactor having a circular shape. The Moon has many more craters than Earth because Earth has processes that can erase almost all evidence of past impacts, such as tectonics and volcanic flows, while the Moon does not.