The moon's circular craters are the result of flying objects such as meteorites crashing into the moon's surface. This contact is known as an impact, and the resulting crater is officially known as an impact crater.
Though impact craters tend to be perfectly round, the objects that create them almost never are. The round shape is created by the force of the explosion that's caused when the meteorite smacks into the moon and breaks apart. The typical crater that's left behind is much larger than the object that created it. All of this, from the impact to the impression it leaves behind, is the result of the moon's solidity.