The Legend of Zelda: Majora's Mask is a direct sequel to The Legend of Zelda: Ocarina of Time. And according to the official timeline, it takes place on the child Link timeline.
At the end of Ocarina of Time, Link is sent back to his childhood by Zelda, acting as one of the seven sages. Thus creating the child and adult timeline branches. Majora's Mask takes place very shortly after the end of Ocarina of Time, and the Link in Majora's Mask is precisely the same Link in Ocarina of Time; the Hero of Time.
The key difference here is the setting. Link finds himself in Termina, which is not Hyrule. And given that Link fell through a tree to get there, it seems impossible that Termina and Hyrule are the same world.
The original Majora's Mask game manual appears to confirm this, and more (emphasis mine):
[Termina] is a kind of parallel world that is similar to, and yet different from the land of Hyrule.... Termina is a mysterious place, and the people Link meets here may look vaguely familiar at first glance
Hyrule Historia says about as much about Termina:
Termina: A strange parallel world, where many of the inhabitants look identical to the people of Hyrule (Hyrule Historia, p 111)
This is the closest thing to any official explanation comes as to where Termina is. It suggests that Termina is some sort of parallel world, and confirms our suspicions that the people here look familiar. It offers no real explanation as to why the people look familiar (other than the fact that Termina is parallel to Hyrule), and there is no official in-universe explanation as such per se.
On the "Link is Dead" theory
There is a theory that Termina is a sort of purgatory, and that Link is actually dead all throughout Majora's Mask. And indeed there is a good amount of dialogue, particularly from the Happy Mask Salesman, that seems to support this theory. However, there is no hard evidence that supports this theory.
Parallel worlds are not a foreign concept to the Zelda universe. In A Link to the Past and A Link Between Worlds, our hero travels between the Light World and the Dark World, Hyrule and Lorule. The Dark World is a near exact clone of the Light World, so it's not that far fetched that the Hero of Time has found himself in a parallel world.
Furthermore, fall damage is a consistent element of Zelda games, but also consistently deals around 1 heart of damage at most. Furthermore, in Majora's Mask, if Link lands on a Deku Flower (which he does at the end of the falling scene in the opening), all fall damage is negated. So the idea that a long fall necessitates death isn't necessarily the case.
Hyrule Historia offers some strong evidence against this theory. Let's go to Twilight Princess to find where it is.
Hyrule Historia says that the Hero's Shade is the spirit of the Hero of Time, of whom, the Hero of Twilight is a descendant. (point of order: the Hero's Shade is not a Stalfos) Furthermore, it identifies that this is not a metaphorical descendence: (emphasis mine)
...Link, a young man from Ordon Village in whose veins flowed the blood of the Hero of Time. (Hyrule Historia, 115)
In-game dialogue from Twilight Princess further suggests that the Hero of Time and the Hero of Twilight are of the same blood line. Which implies that the young Hero of Time may have gone on on to have a family. None of this is explicitly stated, however, it is very strongly implied that the Hero of Time continues to live his life after Majora's Mask. While death is a recurring theme of Majora's Mask, there's no hard evidence that Link, himself, is dead throughout Majora's Mask.