After you get the Mirror Shield from Beneath the Well, you can enter Ikana Castle, a mini-dungeon where you get what you need to reach the next dungeon.
Get a Powder Keg
You will need a Powder Keg at one point in Ikana Castle. If you have not done the Powder Keg test by opening the Goron Racetrack, read how to make Powder Kegs available. Then you can buy Powder Kegs in the West Clock Town bomb shop if you wear your Goron Mask and talk to the Goron there.
Entering the Castle
You can get here from the room where you got the Mirror Shield in the well mini-dungeon, or just go to the gate of Ikana Castle and look to the left to find a hole in the wall. If you enter from this hole, turn left and hit the crystal switch, then reflect the light onto the blue sun block. Go through.
From this outside area, go into the big entrance door of the castle. It's in the middle on your map, between two stone columns.
Let the Light In
There are ReDeads in the middle of this room. You can wear either the Gibdo Mask, the Garo's mask, or the Captain's Hat to stop the ReDeads from attacking you. To the right, you can see a frozen eye switch on the southeast column. There is actually another frozen eye switch on the northwest column. Shoot the northwest one with a Fire Arrow to open the north door. Go through the north door.
Hit the crystal switch in front of you to raise the hot bricks covering the floor. They don't stay up for long, so run to the locked door in the northeast of the room. Transform into a Deku Scrub. When the ceiling goes back down, hit the crystal switch near the locked door to raise the bricks, then quickly get into a flower and float to the high ledge that has a button on top. As soon as you are touching the ledge, stop floating. That way, you will grab the ledge and pull yourself up just in time to get onto the platform before the bricks fall. Take off the Deku Mask and stand on the switch to activate it. Use the hookshot or an arrow to activate the crystal switch once more and raise the bricks, then quickly jump down and go through the door that just unlocked.
There are three Skulltulas in this room. You can see one to the right. Shoot it, then walk to the right from the door and then look to the left to see the other two. Shoot them as well. Now use the Lens of Truth and look to the left from the door. There is an invisible block of ice. Jump onto it, and from there jump to the switch. Step on it to unlock the door. Then jump back across the invisible ice to the door. Put on the Deku Mask and float to the platform to the right of the door that has four pots on it. Before you dive in, look for the spiked balls between the two pillars. Spit a bubble to make one of the spiked balls swing onto the other one, making both of them explode. Get into the flower and float between those two columns to reach the exit door that you unlocked a moment ago. Take off the Deku Mask and go through.
Put on the Stone Mask to make the Bubbles here ignore you. Go straight ahead from the door and go into the stairwell at the end. Go through the door up above and you will be outside.
Go forward and climb up the ledge in the corner of the wall. Then climb onto the wall and start walking to the left. Eventually there will be a ledge to the right that has a Deku Flower on it. Jump down onto that ledge. You might want to shoot down the Guay that are flying around. As Deku Link, use the Deku Flower to float over to the switch. Take off the Deku Mask and step on that switch. This moves a big stone block, letting sunlight shine into the southern part of Ikana Castle. Then jump down to the ground below and go back into the big entrance of the castle.
Reach the Roof
Wear your Gibdo Mask or Garo's Maks or Captain's Hat to prevent the ReDeads from attacking you. Then use a Fire Arrow to shoot the frozen eye switch that is straight ahead on the southeast column. Go through the south door.
Go into this room and you wll see a Floormaster standing in front of a blue sun block. You can kill the Floormaster by shining light on it with your shield, or just kill it with your sword. Three small hands will come out of the Floormaster when you kill it. These can also be killed with sunlight, or just kill them with your sword. If you don't kill the small hands quickly enough, they will grow and become large Floormasters. After the Floormasters are gone, shine your shield light on the big blue sun door. There are ReDeads just beyond the door. You can wear one of the aforementioned masks to prevent them from attacking. Go through the door behind them.
A Wizzrobe attacks. Wait for it to appear in a column of light, then wait for it to start dancing around, then shoot it with an arrow. After a few attacks, it will split into four copies of itself. The only correct one is the one that has a flame on its staff. When that one starts dancing around, shoot it. After it is gone, go through the door that is at the top of the short set of stairs.
Get past the ReDeads and go up the stairwell. Go through the door at the end.
Don't go into the hole. Follow the path to the right until you see a green Z-Targeting target on the ground. Use a Powder Keg on it. If you don't have one, read the Get a Powder Keg section at the top of this page for details about how to get one. Then warp back to Ikana Canyon, get into the Ikana Castle by the hole in the wall to the left of the big gate, then enter the main entrance and go through the south door, then follow the path until you are back on the roof.
If you have a Powder Keg and you are back on the roof, then transform into a Goron, put the Powder Keg on the cracked roof that has a green Z-Targeting target above it, and shoot the Powder Keg with an arrow to make it explode (or just wait for it to explode). Equip one of the aforementioned masks that protect against ReDeads, then fall into the hole.
You can kill the ReDeads with the light reflected from your shield. Then walk toward the blue sun block and use your shield to reflect light onto it. Go past where it was to reach a new room. Break the pots in this room to replenish your supplies, then go through the door.
Walk forward to start the battle. Wait for a guard to come forward and hit you, then hit him. While he is down, use a fire arrow to burn a curtain, then stand in the light that was revealed and use your shield to burn the other curtain. Or just shoot the other one with a Fire Arrow. Then hit the guards with regular attacks until one of them falls onto the ground. Then run into a beam of light and shine it on the guard while it is still down. Do this on both guards until they both die.
King of Ikana
Then the King of Ikana attacks. He can detach his head and make it fly around. If the head grabs you, the king's body will hit you with the sword. You can avoid the head if you roll as Goron Link. Avoid the King's attacks and hit him until he falls down, then shine the light on him.
Learn a New Song
When you defeat the king, you will learn the Elegy of Emptiness. When you play this song, you can leave behind an empty shell of yourself. You can play the song while in human form, Deku form, Goron form, or Zora form to leave a different type of statue behind. This means there can be up to four statues at a time. Playing the song again makes the current shell disappear and be replaced with a new one where you are standing. The statues can be used to step on switches and keep them pressed.
Now you can go to the Stone Tower, which is the location of the fourth and final dungeon. First you should find the owl statue near the Stone Tower. To do that, go out through the door of the throne room, go through the next door, then go straight ahead while wearing the Gibdo Mask or Garo's Mask or Captain's Hat. Warp to the Ikana Canyon owl statue or just walk there. Then from the statue, go toward the cave where you defeated Flat's evil brother by playing the Song of Storms. Instead of going into that cave, go toward the right. Find a statue along the wall that looks like a mouth with its tongue sticking out. Walk up that tongue. You'll be in the Stone Tower area.