After you defeat Zant in the Palace of Twilight, you must go to Hyrule Castle to confront Ganondorf.
Get a Key
You begin in a courtyard. There are many Kargaroks flying around that will attack if you get close.
There are two paths to the sides, and a path to the north, but the door to the north is locked. Look for the side path where the castle wall above the door has some damage. That path is easier to start with, so go toward the door that has the damaged castle wall above it. A barrier appears around you. Kill all the Bokoblins that appear, and the barrier will disappear. Go through the nearby door.
Make your way into the area, and another barrier will appear. You will be swarmed by more Bokoblins. Kill them all to make the barrier disappear.
Go through the open door and follow the stone walkway until you reach a gate. Look for the chain to the side of the door and pull on it to open the gate. Go through, and follow the stone walkway to the raised area. Walk to the middle of the raised area, and another barrier will appear. Go farther in, and King Bulblin will attack.
King Bulblin can block your attacks with his axe. Try different techniques to get around this, such as Shield Bash, Mortal Draw, and Back Slice. If he is about to swing his axe forward, jump to the side. If he is about to do a sideways swing, you can just put some distance between you and him to avoid the attack. He will sometimes spin his axe for a few moments. Keep your distance to avoid this as well.
After you defeat him, he gives you a small key.
Get the Map
Afterward, go to the torch in the nearby corner and open the chest there to get a red rupee.
Then look for the torch in the opposite wall. Go to it and you find some stairs leading up. This area has a crack in the wall that allows you to jump down onto a ledge to the south. Open the chest on that ledge, then drop down to the lower area and go south to the door. Go through it to return to the central courtyard.
Even though you have a key now, don't go through the north door yet. Instead, go toward the door at the end of the side path that you haven't gone down yet. Another barrier will appear, and more Bokoblins will attack. Kill them to make the barrier disappear, then go through the nearby door.
In this area, you will see Bulblin Archers on towers, as well as Bokoblins on the ground. Stay near the door and kill the Bokoblin that approaches, then shoot the three archers on the towers. Afterward, go between the three wooden towers and kill more Bokoblins there, then go north from there.
At the north end, look for the archway in the wall to the side. You will find some Bullbos there. Climb onto one and Dash through the wooden fences up ahead, but try not to hit the explosive barrels to the south. If you crash into a wall, you will need to wait a few moments before the Bullbo lets you climb back on. Use the Bullbo to Dash through the fence to reach the side of this area that you haven't been to yet, and go north. Try knocking down the archer towers as you go.
After you break through the last northern fence, you reach an area with pillars and a Triforce symbol on the ground beneath them. Go toward the wooden gate in the corner and you will see some leaves on the ground. Use the Gale Boomerang to blow away the leaves. This reveals a smaller Triforce symbol, where some of the lines are green. Make a note of which lines are green, then use the boomerang on the pillars so that it follows the same path as that green line.
When you do it correctly, the gate opens. Open the chest on the other side to get the map.
Get a Second Key
Climb up the nearby ladder, then go south until you find a chest at the end of the path. After that, go back north to the pillars that you used the boomerang on. Look for some leaves to the side of the pillars and blow them away with the boomerang. Then transform into a wolf and use your senses to see that you can dig in that spot. Dig there and you will go to a new area.
Make your way north, and some Stalkin will attack, as well as a Stalfos. When the Stalfos bones collapse, put a bomb on them to destroy the Stalfos.
As a wolf, if you use your senses around the northernmost tree, you will see some ghost soldiers pointing. Transform into a human, then use the Ball and Chain on the boulder in the ground in front of the tree to reveal a switch. Step on it to open a gate. Go toward where the gate opened, and kill the Stalfos on the way. Go into room that opened, and open the three chests to get rupees.
Use your lantern to light up the torch in the room. (There is a container of lantern oil in this room if you need it.) The rain will stop, but only temporarily. Quickly exit this small room and go straight across to a wooden gate in the wall. Use the lantern on the two torches here to open the gate. If you take too long, the rain will start again, and you won't be able to light the two outdoor torches, and you will have to try again.
After you light the two torches, the gate will open, revealing two owl statues. Use the Dominion Rod to move the statues to the south end of this room, where there are two pits in the ground. Move a statue into each of the two pits. Then climb up the short ledges to the side, and jump across the owl statues to reach the other side.
Up ahead, pull the chain to open the gate. Then open the chest to get a key.
Get the Compass
Go back down to the ground near the owl statues. Transform into a wolf and dig in the ground near the statues. You will return to the previous room.
Go into the nearby room with the torch in the wall, and climb up the ladder. Go south and look for a gap in the short stone wall where you can jump down. Be careful to avoid the archers and Bokoblins, and go through the south door.
From the center courtyard, you can go south to return to Castle Town if you want to get supplies or upgrades, or make any other preparations before the final dungeon. If you are ready to enter the final dungeon, go north and unlock the door to enter.
Go north and another barrier will appear. Kill the Bokoblins, then kill the Lizalfos, until the barrier disappears and a chest appears on a balcony. Walk up onto the short platform nearby and use the Clawshot on the chandelier above the balcony. Drop down and open the chest to get the Compass.
Use the Clawshots on the nearest chandelier, then lower yourself down and use the Clawshot on the north chandelier, to reach the north balcony. Go through the door there.
There is a Darknut in this room. Fight it just like you fought the Darknut in the Temple of Time, but when it loses all of its armor, you will have to dodge when it throws its sword at you.
After you defeat the Darknut, a chest appears. Stand between the short wall and the north wall, and use the boomerang on the one lit torch to blow it out. The platform will rise and you can reach the chest. If you make a mistake, you can light the torch again to lower the platform and try again. There is lantern oil in a container nearby if needed.
From the treasure chest, there are two paths you can take. One of them is easier than the other, but the harder path has some treasure chests that contain a large number of rupees. The harder path, with more rupees, is the one that has shields on the wall near the door (hereafter referred to as the shields path), and the easier path is the one that has only spears on the wall near the door (hereafter referred to as the spears path).
If you go through the door that has shields on the wall nearby, kill the two Lizalfos at the end of the hall. There are four paintings on the walls here, hanging from ropes. Three of the paintings show Hyrule Castle in the daytime, and one of them shows Hyrule Castle at sunset/twilight, so it looks orange/brown compared to the others. It's the middle painting on the wall that has three paintings. Shoot its rope to make it fall, and hit the crystal switch behind it to unlock the door. Go through. (The other paintings' switches cause Chus to fall from above, so if you want to kill them to scoop their potions into bottles, feel free to do so.)
After you have hit the correct switch and gone through the door that opened, there are two Darknuts at the end of the room. Try to approach them slowly from the side, to make only one of them start to approach you, so you can fight them separately. The Mortal Draw works well for hitting them before they have lost all of their armor. Kill them both to unlock the doors. One door is to the north, and the other is to the south. Go through the northern door first to find a chest that contains a purple rupee. There is also a switch on the floor on the other end of this balcony. Step on it to make another chest appear. It contains a silver rupee, worth 200 rupees, so if you don't have room for it in your wallet, just go back into the hallway. Otherwise, if you want it, drop down to the lower level and use the Clawshot on the nearest chandelier, then lower yourself partway down and use the Clawshot on the chandelier above the balcony that has the new chest on it. Drop down and open the chest to get the silver rupee.
If you got the silver rupee, drop down to the lower level, walk up onto the short platform nearby and use the Clawshot on the chandelier, and use the chandeliers to reach the door on the northern balcony, and go through. Then stand between the short wall and the north wall as before, and use the boomerang on the one lit torch to blow it out. The platform will rise, and you can go back down the shields path to continue (or you can go the other way if you feel like it, but there are no treasures there). From the room at the south end of the shields path, go through the southernmost door.
Get the Big Key
Go straight ahead, toward a gate in the wall. After a cutscene, go to the treasure chest that was behind the gate that opened. Open it to get the Big Key.
Get a Third Small Key
Go back toward the door, but don't go through. Go up the ramp and follow the path to the south. A barrier will appear, and an Aeralfos will attack. Use your Clawshot when it raises its shield, and hit it with your sword until it is defeated. Go through where the gate was, and open the chest to get a small key. Then skip to Hyrule Castle Tower below.
From the room where you blew out a torch to make the platform rise, if you go through the door that has spears on the wall nearby, you reach a dimly lit room with no enemies. Go toward the locked door at the end of the room. Look for the painting on the wall, and use an arrow to cut its rope so it falls on the floor. This will reveal a diagram on the wall that shows a flame with a line coming from it. You need to light the torches in this room in the order indicated by this diagram, but be warned that as soon as you light a torch, Keese will attack, so be prepared to avoid them. The flame on the diagram indicates which torch to light first. The bottom of the diagram is south, the top is north, the left is west, and the right is east. If you do not light the torches in the correct order, they will go out very quickly, so if you are confused, use that as a clue to help you determine the correct order.
Once you have lit the torches in the correct order, the locked door will open. Go through.
Kill the two Dynalfos in this room, and the doors will unlock. Go through the northernmost door (the one between two suits of armor) to find a switch. Step on it to lower a chandelier, creating a shortcut back here if needed.
Then go back through the door into the hallway, and go through the door across the hall.
Get a Third Small Key
Go straight ahead, toward a gate in the wall. A barrier will appear, and an Aeralfos will attack. Use your Clawshot when it raises its shield, and hit it with your sword until it is defeated. Go through where the gate was, and open the chest to get a small key.
Get the Big Key
Go back toward the door, but don't go through. Go up the ramp and follow the path to the south. After a cutscene, go to the treasure chest that was behind the gate that opened. Open it to get the Big Key.
Hyrule Castle Tower
Go back up the ramp and go through the door in the middle of the north wall.
Transform into Wolf Link and use your senses to see the Ghoul Rats that latch onto you. Use a charged attack to get rid of them.
Proceed carefully through this room, because some of the tiles are unsafe to step on and will crumble beneath you. Look for the ghost soldiers with your wolf senses. They are pointing in the direction that it is safe to go. Go where the first ghost is pointing to find a second ghost, and go where the second ghost is pointing to find a third ghost, and so on. When there are no more ghosts, go north.
Carefully jump over the gaps in the broken staircase, to reach the top. At the top, another barrier will appear. Kill the two Lizalfos (you can approach slowly to make only one of them attack you at a time).
Go to the broken stairs leading upward, and use the Clawshots on the torch gratings (the stairs themselves are too far apart to jump between) to reach the top. Another barrier will appear. Kill the two Lizalfos here, just as before.
Use the Spinner on the track that has a small piece of stairs in front of it, then jump between the tracks as needed to avoid the blade traps as you go up. At the top, go into the next area. A barrier appears, and this time you have to fight a Darknut.
Afterward, if you got all the keys in the castle, you should have one left, which you can use to enter the side room here. It contains a number of chests containing rupees, bombs, arrows, etc. When you are done, exit the treasure room.
Go through the boss door in the south wall. When you are ready for the final battle, go up the stairs and through the archway.
After a long cutscene, the battle begins. Before each attack, Ganon's Puppet will point its sword upward. There are three possible attacks: throwing an orb at you, lighting up a triangle on the ground, and flying toward you. If Ganon's Puppet throws an orb at you, keep knocking it back with your sword until it hits Ganon's Puppet. If Ganon's Puppet lights up a triangle on the ground, run off of it so that you are not standing on it. If Ganon's Puppet flies toward you, run away until the attack stops.
This phase of the battle will end after you have hit Ganon's Puppet with three orbs.
Dark Beast Ganon
When Dark Beast Ganon dashes toward you, you can either try to shoot his forehead, or you can transform into Wolf Link and hold the A button when it says "Push" on the screen, then move the control stick side to side to throw him. Then transform into a human and hit his glowing belly until he gets up again.
When he disappears, his shadow may appear above you. Be prepared to dash away from the shadow. Another possibility is that instead of his shadow appearing, some portals will appear. Watch the portals, and when one of them turns purple, be prepared for Ganon to dash out. Knock him over as before.
The battle will end after you have performed three attacks on his scar.
After a long cutscene, a new phase of battle begins.
Ride toward Ganondorf. Throughout the horseback battle, be sure to never get close enough for him to hit you with his sword. If he rides toward you, Dash once to get out of the way. Similarly, if he is chasing you, only Dash once while you try to dodge away. Your goal is to be behind him, chasing him, but if you use too many Dashes, he may will outmaneuver you.
When you are behind him, lock onto him when you are close enough, so Zelda can aim. If he spins an orb of light, he is about to summon five ghost riders. Avoid letting them hit you, and avoid running into them. If you fall off of Epona, get back on as soon as you can.
When Zelda stuns him with a Light Arrow, Dash once to get close enough to hit him with your sword.
Dark Lord Ganondorf
Whenever the A button appears on screen and says "Chance", tap the A button repeatedly. When you knock Ganondorf back, slash with your sword until he recovers.
Don't try the Mortal Draw during this battle. He will dash forward and strike before you have time to draw. If you try Shield Bash, he will just kick you and put you off balance. Jump Strike sometimes works, and you may be able to hit him with Back Slice as well.
If you watch him closely, he will move just before he stabs forward with his sword. If you are standing close enough and you move slightly to the side away from his sword just before he stabs, you may be able to quickly stab him with your own sword while avoiding his. He may get better at dodging this afterward.
If you move backward, he is likely to dash forward and try to hit you with his elbow, then swing with his sword while you are off balance, so avoid moving backward during the battle.
If he jumps up and disappears, run out of the way, because he is about to land nearby and do a spinning slash.
If he falls onto his back, lock onto him and get close enough for the Finish option to appear, and use it to end the battle.
Congratulations! You won! Be sure to watch the credits and the post-credits scene!