How to beat Ganon
The Immortality Principle: "The bad guy is never, ever dead. Not until you see his body crushed into a trillion tiny particles of dust with your own eyes is the main villain absolutely definitely gone forever, and frequently not even then." This applies to James Bond's arch-nemesis Blofeld, to pretty much every enemy in Dragonball Z, to almost all horror movie villains, and it applies to Ganondorf in Zelda 64. Because if you just beat him, and you thought the game was over, you are very much mistaken.
Ganon is the final final boss in N64 game The Legend of Zelda: Ocarina of Time, and the final incarnation of Ganondorf in that game. He appears shortly after you've "beaten" Ganondorf and made your way out of his castle. He is slightly easier to defeat than Ganondorf was, but it's still no walk in the park.
Disclaimer: If you haven't already given it your best shot - remember, try every item in your inventory - then go away and do that now. You will get infinitely greater satisfaction from beating him unaided that you'll get by reading this guide. But if you're completely stuck, I guess I can't stop you reading ahead.
Preparation: Get Biggoron's Sword if you can, as many bottles as you can find, and fill them all with red fairies, which can be obtained in large quantities by playing Zelda's Lullaby by any Gossip Stone. (There are four Gossip Stones within easy reach of the final arena, just outside the Temple of Time.) Get the half-damage power-up from the Fairy Fountain outside Ganon's Castle. Loading a game that was saved at any time between Ganondorf and the end of the game will return you to the bottom of Ganon's Castle, before you face Ganondorf. You can't save anywhere between. So try to get past Ganondorf using as few of your resources as possible.
The spectacular destruction of Ganon's Castle leaves you with a large flat, black, open-air plain to fight on. The arena is ringed with fire so there is no escape (but equally, no chance of falling off the side). There are various large chunky blocks of masonry left behind from the castle's collapse. These are relatively sparsely arranged around the outside of the arena. Although you personally can't destroy them, it is possible to lure Ganon towards them. When he encounters the block in his path, he will roar and smash it, releasing about five identical power-ups. Sometimes these are useful (hearts, magic) but you will find that you often get useless items like Deku Nuts and Bombs, which can be very frustrating. Lure him to one of these if you find yourself short of health or anything else.
The arena is extremely large and circular, leaving plenty of room to manoeuvre. Make full use of this but make sure you don't end up running into the wall of fire.
Oh, one more thing. You will not have your Master Sword for the first part of this battle. Fun!
Ganon's attack pattern
As attack patterns go in this game, Ganon's is extremely simplistic. He starts in the middle of the arena and will simply stomp towards you until you are within range, then attempt to slash you. If you get slashed you'll get knocked backwards and take a major amount of damage. If he encounters a block in his path, he'll smash it, as described above.
That's about it. You can run away from him fairly fast, and easily outrun him, as long as you aren't Z-targeting him. Speaking of which, Navi is back for this battle. She will give you no helpful advice - quote: "I have no idea what his weak point is!" - but she will point out two locations on Ganon's body while she does this; his head, and his tail. After you've done Ganon some damage (see below), you'll get your Master Sword back, but more importantly Ganon will start to move much faster than before. You'll really need to move fast to get out of his way now, but there are no changes other than that.
As singled out by Navi, Ganon's weak point is actually his bulbous tail. The only way you can do damage to him is to attack the tail. Luckily, although he can be stunned, he doesn't need stunning like the other bosses in Zelda, so you can attack the tail at pretty much any time you like. Unfortunately, since Ganon always faces towards you and takes a swipe whenever you get near, getting around behind him to attack the tail is somewhat tricky. Worse, you don't have your Master Sword.
If you have Biggoron's Sword, then you don't have anything to worry about. It's twice as powerful as the Master Sword and you really don't need your shield for this fight: it's useless against Ganon's daggers. If you don't have it, in general I find that your best alternative is the Megaton Hammer. It takes a long time to connect but it does do plenty of damage.
Given that Ganon turns pretty fast, getting to his tail is not easy if you're about to try running around him. However there is a considerably simpler method which is pretty much foolproof. Get a safe distance from Ganon and then run straight towards him, into his chest. Ganon will stop and attempt to slash you. However, since you're so close in the swipe will not connect, and you stay safely pressed against his belly. Now, while still running forward, the A button should've changed to "Attack". Hit A now to roll forwards and between Ganon's legs, then straighten up right behind him, a fraction of a second later. (If you like, you can stun Ganon by Z-targeting his face and shooting a Light Arrow at it while he stomps towards you, but I find this is unnecessary. Just run in and roll.)
Now Navi will target his tail for you, but the camera will go mad as it whirls around you, with Ganon's body blocking your view of what's going on. This makes connecting a blow with his tail tricky. The best way to solve this is to hold Z so that Link is pointing towards the tail and then press B or the relevant C-button to attack. You'll know if you're successful because Ganon will wail and flash red all over - like any other enemy. You can only get one hit in before Ganon will quickly spin around (he might catch you briefly behind one of his legs) and resume chasing you. So you need to act quickly.
After you've dealt a large number of hits, Ganon will collapse, momentarily weakened. The flames will drop and you can go and get the Master Sword back. Don't tempt fate by not doing this. It's impossible to complete the game without the Master Sword, and Ganon's energy will be right back at maximum as soon as he recovers in a few moments' time. Just run, get the sword, and come back. If you were using the Megaton Hammer you can now switch to the Master Sword, otherwise continue with Biggoron's Sword. Repeat the same attack pattern. Eventually Zelda will summon the Sages' power and pin him. YOU MUST STRIKE A BLOW WITH THE MASTER SWORD NOW. Anything else will do no good, and Ganon will get up and you'll have to go through the whole palaver of killing him all over again. After the final blow is struck, Ganon will die for the last time. Now witness the lengthy, but exceptionally enjoyable, end sequence, and sit back in the knowledge of a job well done.
Bearing the Immortality Principle in mind, you would expect that Ganon would one day return. And, indeed, he already has. Chronologically speaking, despite being one of the most recent, LoZ:OoT technically comes at the start of all the Zelda games, so any NES, SNES and Game Boy Zelda games featuring Ganon confirm that he does eventually return! UPDATE June 14, 2003: The Legend of Zelda: The Wind Waker proves this beyond all doubt; it is set hundreds of years later in the same timeline, and also features Ganondorf.
This was the eleventh and final boss from The Legend of Zelda: Ocarina of Time.
Previous boss: Ganondorf.