Ocarina of Time

The Ocarina of Time is a recurring item in The Legend of Zelda series. It is an instrument Link uses to play Music. It is a transverse ocarina (also known as a "sweet potato ocarina").

The Ocarina of Time's origins are unknown, since its history is only briefly spoken of in Ocarina of Time. Princess Zelda mentions that the sacred instrument has been secretly passed down for generations within the Royal Family of Hyrule, kept safe from those who would exploit its power to cause others harm. As such, it is a treasured heirloom of the Royal Family and will only be given to the one who will open the Door of Time to retrieve the Master Sword. Full of endless mysterious powers, the Ocarina of Time proves to be a magical instrument that serves many hidden purposes which only a selected few can truly uncover.

Ikran's Lost OoT/Pokémon crossover
Much like the game, it was revealed by Princess Zelda when Link, Navi, and Zelda II first met her, as one of the sacred keys to open the Door of Time while it's being played the Song of Time near the altar. At first, both Link then shared to Zelda II had the Fairy Ocarina which possessed similar properties; however, it wasn't until they were able to find all 3 Spiritual Stones and witnessing Zelda and Impa's escape from Ganondorf. They found it within the castle's moat and they were taught this sacred melody. They used it, then the way to the Sacred Realm was open as he lifted the hilt of the Master Sword, resulting in Ganondorf secretly following them in and corrupting all of Hyrule. Seven years later, this was Link's primary instrument as he learned the warp songs by Sheik as well as a few minor numbers like the Song of Storms. It was used multiple times for various purposes throughout the adventure, even when playing the peaceful Zelda's Lullaby to attract any Pokémon survivors. Compared to the Fairy Ocarina, even Saria herself noticed it sounded better, only implying if Link had been practicing. When Link was caught then mesmerized, instead of executed, by the Gerudo and stripped from his weapons/equipment, Mewtwo played it to restore his deeper memories using numbers such as Saria's Song, Zelda's Lullaby, and the Song of Time to remind him who he truly was and gradually breaking the thrall. It was finally used by Princess Zelda as she was able to send Link, and his partners, to the Temple of Time after Ganon's defeat, awaiting their return to the past, but...

The Lost Legend of Namira
The Ocarina was never used again, until Zelda II's lucid dream. Instead her more inferior replacement, the Fairy Ocarina, was played instead, whether it'd be the Song of Storms to grow new crops, or summoning Epona, or just a few random numbers as Link's reminiscence and reassurance. The Trainer surprisingly had it in her own possession during her altered reality, as it was able to petrify the ReDeads with the Sun's Song and Zelda's Lullaby to awaken the powerless Great Fairy.

According to Impa's prologue, the Ocarina of Time was believed to be created by the mystical Time Stones that were foreign to Hyrule, the same ones that once made the Lanayru Desert and neighboring landscapes a paradise until they died out.