From Zelda Legends Wiki
Possibly the most important part of MM is the Moon. The Terminian Moon is about the size of Clock Town, and has a large, frightening face. Occasionally, precious stones called Moon's Tears fall from its eye.
When Link arrives in Termina, everyone is worrying because the Moon is far closer than it should be, and it's coming closer all the time. It's close enough to be seen in the daytime. At the end of the third and Final day, it will crash into the earth, wiping out Termina. Playing the Song of Time, however, will return it to its dawn-of-the-first-day position, with everything else. Playing the Inverted Song of Time will slow the Moon, along with the Sun, the Clock Tower, and all other clocks.
Skull Kid, under the power of Majora's Mask, has been bringing the Moon down. Link manages to stop it by gathering all four Guardian masks, climbing the Clock Tower after midnight on the Final Day, and playing the Oath to Order to summon the giants who hold back the Moon. However, Majora's Mask draws Link into the Moon for a showdown.
The inside of the Moon is very strange, and many have speculated that it actually is inside Link's mind. It contains a large field with a single tree in the middle. Four children, wearing the Guardian masks, dance around the tree, and a fifth child, wearing Majora's Mask, sits by the tree. Speaking to the dancers takes Link to the Moon dungeons, and speaking to the sitting child takes Link to the battle with Majora.
After Majora is defeated, the Moon is no longer a threat to Termina. It is unclear whether it has actually defeated or whether it was simply returned to its rightful place, but either way, when the Dawn of A New Day comes, the residents of Termina are assured of their safety. It was a near-cataclysm that had never happened before, and would never happen again.
Entry submitted by Shay Guy.