The below backstory is relayed in the intro of the game
Many years ago, the Gerudo were dragged into a war with the rest of Hyrule by their King Ganondorf’s obsession to obtain the legendary Triforce.
Ganondorf plunged the land toward darkness and ruin. But as Hyrule teetered on the brink of collapse, the evil King was defeated and sealed away into a realm of darkness.
Following his defeat, his people, the Gerudo were exiled into the harsh wasteland of the desert, guarded so no Gerudo King could again wage war on the peaceful land of Hyrule.
In the absence of war, Hyrule prospered. The King gained respect with the defeat and exile of the Gerudo, and the Royal Family steadily gained power and wealth.
Many years later, a Gerudo King again appeared from the desert sands. Arriving in Hyrule, he was greeted by the Royal Family’s strongest warriors- but he carried no sword or, it would seem, darkness in his heart.
The new king claimed he’d learned from his ancestors’ mistakes. If his people were to survive, it was time for them to mend their relations with the people of Hyrule.
It was unclear whether the Royalty was more interested in his message or in the marvelous gifts he brought from the dusty lands. But they agreed to hear him.
Link's backstory should not be told as part of the prologue. The game begins and the player discovers Link's history through dialogue in the opening sequence and by talking with the gang members.
A decade has passed, and our story opens in Hyrule Castle Town. It is divided by a grand avenue that leads all the way up from the main southern entrance to the royal castle itself, a vain monument to the royal family that effectively segregates the townsfolk into two communities: one half is poor and run down, its inhabitants have turned to petty crime just to survive; the other is prosperous and peaceful, but also selfish, greedy and ignorant of the poorer folks' plight.
The royal family of Hyrule - adored by the rich, unpopular with the poor - are also ignorant of the suffering of their subjects, leading a pampered and sheltered existence behind the castle walls.
The hero of the story is a young orphan boy named Link, who was taken under the wing of Farin, the fatherly leader of a gang of child thieves, when he was very young. He lives in their hideout in the poor area of Castle Town.
Meanwhile, following centuries of animosity, the king of the Gerudo has suddenly made a diplomatic visit to Castle Town. He is gaining favour in the royal court by persuading them to extend the hand of friendship to his struggling people who, after hundreds of years of hostile relations, are too proud to come and ask for help themselves. Noble but humble, and incredibly charismatic, he seems to captivate everybody he meets.
- When the player first meets this character, we should be careful to create enough ambiguity that they might naturally assume this to be the true, exiled king come to ask for help. But it is in fact Ganondorf, stripped of his Triforce piece and therefore considerably less powerful, he is seeking to take the Triforce by more stealthy, devious means, ingratiating himself with the royal court and biding his time until the opportunity comes to strike. But the player, and Link, will not find this out until deep into the game.
The royal family are flattered to be the object of the Gerudo king's mercy mission, and greedily accept the luxurious gifts he lavishes upon them, but his only genuine ally appears to be the compassionate young Princess Zelda who seems wise enough beyond her years to truly understand his peoples' predicament. She is committed to helping him, despite her parents' apathy. It is her wish that he become a friend and trusted confidant of the Hyrulian royal family, and for the duration of his visit he is to stay in one of the castle's many sleeping quarters.
- This establishes Zelda as a good and kind-hearted person, even though she comes from a selfish and pampered family. She is, however, still naive and her latent magical powers cannot at first pick up on the Gerudo's deceit. Slowly, and throughout the game, doubts as to his motives begin to creep into her mind as she is haunted by magical visions of his ultimate betrayal.
TUTORIAL - Gameplay basics and getting to grips with controls etc.
One morning, the gang's leader instructs Anton, a child in Link's gang of thieves to take Link out and show him how to navigate the city. Anton shows Link around poor Hyrule town, teaching how to use thief techniques to move around. As they near the edge of the poor section, Anton tells Link to stop, because the guards in the rich section are always watching for poor people. As they prepare to head back to their hideout, Sykes, a thief Link's age, saunters across the roof and challenges Link to a race across the roofs, taunting Anton when he warns Link not to. Link accepts the challenge, and they race across the town and eventually find themselves in the Town Square.
Sykes takes this as an opportunity to again taunt Link, challenging him to steal things using the pick pocketing technique. Sykes recalls that this is something Link has always had trouble with. Link can successfully steal bread from a stall, but when he tries to pickpocket a rich citizen, he notices and calls the guards, forcing Link and Sykes to flee the square.
The streets are unusually chaotic, there are guards everywhere, but Link quickly realizes they are not looking for him. He overhears that Princess Zelda has disappeared on an official visit to Castle Town and the guards are searching everywhere.
His path home is blocked by guards, so he uses his newly acquired thief skills to sneak by undetected. Down a back alley he bumps into the princess disguised as Shiek, who ducked out of the procession, horrified to discover so poor a part of her families' kingdom could exist.
They talk a while, the gracious young princess seems determined to help the poor folk. How can they hope to reconcile themselves with the Gerudo when the same injustice occurs on their own doorsteps?
Just then the guards and the royal nanny arrive, closely followed by the shopkeeper who relays the story of Link's crime.
The nanny concludes Link must have also been trying to kidnap the princess. Despite Zelda's protests, Link is thrown in jail.
That night, the celebrated Gerudo king turns up unannounced at the jailhouse and bargains with the guard for Link's release. Unsure of his reasons, but glad to be free, Link goes with him.
The king talks of his people, the Gerudo thieves; their history and their struggle, and confides in Link how he hopes to reconcile them with the rest of Hyrule. He tells Link that he heard talk in the royal court of his misadventures and has a proposition for him. This noble gentleman rogue is looking for an apprentice: a naturally gifted thief to pass his skills and his legacy down to. He would treat him like his own son, and be the father to him that neither of them ever had.
Link is tempted by the prospect of living like a prince instead of a pauper, and the chance to learn from a master thief, and a Gerudo no less - that would show his rival - but he remembers he already has a surrogate family, and reluctantly declines the king's offer.
The noble thief is saddened by Link's decision but tells him he admires his loyalty to his friends. Link leaves to go back to the gang's hideout.
He arrives at the hideout to find Farin is out. Link's rival tells him that their leader has been arrested, and that Link must have squealed on him (he has in fact simply gone to the castle to plead for Link's release, but Link will not find this out for some time yet.) The rest of the children are intimidated into playing along with the older kid's story and they decide to kick Link out of the gang.
Feeling hurt, angry and rejected, Link returns to the gentleman thief's quarters and accepts his offer of an apprenticeship.
First thing the next morning Link is sent on an errand. He is to take a voucher to town to pick up some new clothes, befitting of a gentleman thief's apprentice. Before he can leave, the shopkeeper asks him to step into a back room, where there is one last article for his outfit. The shopkeeper hands him some dusty bracers, telling Link he's glad to have these filthy things out of his shop, and sends Link back to his new mentor. Link picks up a finely tailored green tunic and cap, and changes out of his dirty rags.
Upon his return Link's new master elaborates on how it is his most fervent wish to see peace restored to Hyrule, but he fears it is impossible - the Gerudo are too proud to accept help from their sworn enemies, and even with Princess Zelda's support the Hyrulian royal family will never deign to extend the hand of friendship. No, if he is to see his wish become a reality he believes there is but one option. He relays to Link a somewhat abbreviated version of the Triforce myth, emphasising its ability to grant the bearer their heart's desire. Link begins to understand what the King expects of him. He is too old to undertake the task himself, but is willing to pass on his considerable thieving skills to Link in return for retrieving the pieces of the puzzle that leads to the Triforce.
The king explains that, according to legend, the Triforce is held in a sacred realm, the entrance to which is inside an ancient clock tower in the desert. Guarded by the Sheikah and locked by 4 magical cogs (He’s lying about its location, it’s actually a part of Hyrule Castle.)
The king charges his new apprentice with the task of stealing these cogs. They lie hidden in several trap-filled dungeons, long considered the proving grounds for master thieves. Link is told where to find the first of these dungeons and is given his first sword and shield to protect himself whilst completing his tasks. Enthralled by his new mentor, he leaves Castle Town for the first time in his adventure.
Suspicion and Betrayal
All the while a creeping doubt as to the Gerudo king's true motives begins to nag Link. A disturbing thirst for power is becoming evident in his mentor's eyes. His path crosses with Zelda on a number of occasions and he confides in the princess, who has been haunted by visions of her own. Zelda knows all about the legend of the Triforce and begins to suspect the Gerudo king could actually be after the artifact for the same reasons as the evil Ganondorf...
Once the cogs are collected and in the Gerudo king's possession, Link realises his new mentor is planning to betray him, and the scene is set for a showdown.
Just as Link confronts him, Zelda, by now worried for Link, has brought his old gang (minus his rival) and the battle for Link's allegiance begins.
The leader of the gang reveals that Link's new mentor is, unbeknownst to everyone including the royal family, the evil Ganondorf who has escaped from his banishment in the Sacred Realm, eager to resume his search for the Triforce. He tells Link that he knows all this because he is in fact the true king of the Gerudo, who Ganondorf exiled years ago, and he implores Link to realise that his master was only using him to assemble the cogs.
Ganondorf, manipulative to the last, asks Link who he truly believes. Who will he side with?
After some soul-searching Link accepts that Ganondorf was only using him, and defies his new mentor by siding with his old friends. They are, however, no match for Ganondorf who escapes with the collected cogs.
Zelda realises that now Ganondorf is a trusted confidant of the royal family he has free rein to enter the castle as he pleases. There then follows a desperate race to get to the last dungeon, deep in the bowels of the castle's Temple of Time - the Celestial Clock, where the Triforce sleeps for eternity - before Ganondorf does.
When they get there they find it already open and being plundered. If Ganondorf gets his hands on the Triforce he will become so powerful there will be only one way to stop him... Zelda takes Link to a chamber in the temple which houses the legendary blade, the Master Sword, the weapon used by the hero who originally defeated Ganondorf centuries ago. Pulling the sword from its pedestal Link feels the blood of his ancestors coursing through his veins, and understands his destiny is much greater than that of a petty thief. He takes the sword and rushes into the Celestial Clock...
Inside, he finds himself pursuing a mysterious figure, who appears always one step ahead of him. Eventually Link catches up with him and it is revealed to be his rival, who Ganondorf has recruited to finish the job in Link's place. Link defeats his rival and takes the Lightning Rod, using it to activate parts of the dormant machine, until all the power is flowing into a great door mechanism that opens revealing the Triforce.
Ganondorf steps out of the shadows and explains his entire scheme - mocking Link and offering his thanks, since he could not have gotten this far without tricking him and Zelda into helping him, since their destinies are as inextricably linked to the magical golden triangles as his. Then the epic fight for the Triforce begins.
After a great battle Link has defeated Ganondorf. The gang's leader is reinstated as the king of the Gerudo thieves and together he and Zelda unite their people, the two disparate sides of Castle Town begin to live in harmony, the Triforce sleeps safely once more, and everyone lives happily ever after.