Temple of Time
From Zelda Legends Wiki
The Temple of Time is situated on the east side of Hyrule Market, inside some humming can be heard that is very similar to the melody of the Song of Time. Link can enter it at any time in the game and inside there is a big room leading to a pedestral with three gaping holes in it.
Later on after Link collects all three Spiritual Stones He comes back here and uses the the Ocarina of Time to play the Song of Time in order to open the door leading to the Master Sword. Upon pulling the sword from its own pedestral Link is warped to the Chamber of Sages.
After the adult Link returns here in the future he will meet Sheik who tells him about his destiny. She will also teach him the Prelude of Light, which will allow Link to teleport back to the Temple of Time at any given moment. Also by placing the Master Sword back in its resting place Link can travel back to the past, thus allowing him to control time itself.
How do you enter to the temple?
In OoT there is a curious mistake regarding Zelda. After Rauru tells Link to go to the Temple of Time, in the intro it's shown how Link enters on foot to the temple. It doesn't matter if Link goes on foot or using the Prelude of Light.