The "Song of Time" is a powerful melody that is used in the both The Legend of Zelda: Ocarina of Time and Majora's Mask. The tune itself is said to be known only to those of the Royal Family of Hyrule and, to our knowledge, Link is the only person outside of the Royal Family to every learn the song or use the Ocarina of Time itself. The melody itself, when used on the Ocarina of Time, has remarkable abilities. It can adjust time itself to remove objects from your current time, to speed time up, slow it down, or even reverse time to a specified point.
During the events of Majora's Mask the main use of the Song of Time is to reverse time to the point at which Link first arrived in Termina. From that point, he has three days to save the land from the impending impact of the moon. The song is used multiple times to bring Link back to the beginning of this three day period. During each set of days, the goal is for Link to gain tools the can help him complete the tasks required during those three days more quickly.
Variations
There are a couple of variations to the song of time that cause different effects than if played normally. These variations or really just a method of playing the song in a different pattern. For instance, by playing each note twice consecutively as in:
Song of Double Time
Right, Right, A, A, Down, Down.
Link can cause time to move forward to the next 6:00 interval. This can help when you only have on thing left to do later that day or the next day.
Inverted Song of Time
Down, A, Right, Down, A, Right
Doing this will cause time to move more slowly but actions will still be carried out at the same pace. So, for instance, if someone is set to leave their house at 6:00am and they generally don't reach their destination until 7:00am, they will instead reach their destination about 6:20am. This does not necessarily mean that the following action (such as a shop opening) will happen at that time since they are usually their own event set to start at a specific time.


