The Hero of Time arrives in Termina by means of some inter-dimensional rift that he stumbles upon, à la Through the Looking Glass. It is stated in the MM manual that Termina is an alternate reality parallel to Hyrule; the Hero of Time merely stumbles across the portal and goes straight in.
There are two areas where the portal is located, one in Termina, and one in Hyrule; the entrance in Hyrule is located somewhere within the Lost Woods, while the entrance in Termina is inside the Clock Tower. The game does not state whether the portal lasted for much longer than the Hero of Time was in it. I would wager that the portal did not exist much longer before or after the Hero of Time passed through it, because there would have been mention of it by other characters if it had been discovered. The only characters known to have passed through the portal are the Hero of Time, the Happy Mask Salesman, and arguably, Skull Kid. The Happy Mask Salesman also mentions that the portal closes at the end of the 3rd Day, implying that Termina and Hyrule would be separate again forever.