The Legend of Zelda: Ocarina of Time is an old game. I've only recently grasped this. I had one of those "Was it really that long ago?" epiphanies, and instead of the usual being stunned at how old I am, I realised that the game, to me, is ageless. Really, it feels just like yesterday that I was unwrapping the game on one magical Christmas morning and squeaking in delight at what I knew was going to be the greatest gift that year. And, ignoring the dated graphics, the game feels modern, plays like a modern game.
But the reality is the game is old. And that makes it hard to find, if you're not like me, who's coveted a cartridge copy for over a decade now. Thankfully, there's plenty of options for you to get yourself a copy.
Wii Virtual Console
The Virtual Console for the Wii is a wonderful thing. You can find a ton of retro games for pretty darn cheap. The first thing you need is a Wii gaming console with an Internet connection. The Wii console is going to cost you about $250-$350, but believe me, it's massively worth it (see Wii games such as: Super Mario Galaxy, Okami, and, of course, The Legend of Zelda: Twilight Princess). A wireless router or Nintendo Wi-Fi USB Connector dongle ($40, but I hear it's discontinued) will do for the Internet connection. Next, you'll need a way of adding points to your account. You can either purchase points with a credit card through the Virtual Console or buy a Wii Points Card at pretty much any general or gaming store. Cards come at 2000 points for about $20. I believe The Legend of Zelda: Ocarina of Time is currently retailing at 1200-1500 points, which makes it a $12-$15 purchase.
Gaming stores, garage Sales, Buy&Sell, online auctions
If you're truly awesome, then you'll want to play the game the way it was meant to be played. That means getting yourself the original Nintendo 64 Entertainment System. Depending on where you go, prices will vary drastically, so I can't really list them here. You might also want to ask your relatives and friends if they still have their system and would be willing to lend or sell it to you. Don't forget, you also have to get the game, which might be a pricey endeavour, at least compared to the Virtual Console method (random search on Ebay yielded prices between $20-$35).
Instead of going for the N64, you could buy a Gamecube and find either Ocarina of Time Master Quest or The Legend of Zelda: Collector's Edition. The former was originally shipped to players who pre-ordered The Legend of Zelda: Wind Waker, while the latter was freely available at most retail outlets. The first will be more difficult and expensive to find, but the second should be far cheaper and easier to find.
There are, of course, more ... underhanded ... ways of getting a hold of the game. Maybe you have the game but no longer have the console. Or maybe you have the game but it's busted (yes, I know how rowdy pizza 'n pop gaming nights can get). Maybe you used to have the game and even technically still own it, but a friend stole it (I don't blame them). In any case, the following options I can't say I endorse, but perhaps you feel your reasons for pursuing them rest on the lighter end of the gray area. Or maybe you're all Ganon about this. In any case ...
There are tons of N64 emulators floating around the Internet, and tons of copies of The Legend of Zelda: Ocarina of Time ROM, as well. Given the dubious legality of this option, I can't point you to certain emulators or ROMs, but a quick Google search will send you on your way. Keep in mind that you'd be using your keyboard, and this is an Action/RPG game, so unless you're a pro at this already (I have one friend who's far better with the keyboard than with any given controller) you might want to invest in a PC game controller.
Wii Virtual Console: ROMs
If you don't like PC emulation, you can apparently hijack your Wii memory card and load the ROM into the Virtual Console. Like the first option, this is probably illegal, and I've never attempted it myself, but Google is willing to be your partner in crime.
PSP, iPhone, iPod Touch?
I've heard rumours that emulators are available for these products that allow you to play the ROM on them. But I don't know much about it, and I'm sure it's perfectly illegal.
Well, as someone who still has her N64 and cartridge from yonder years, that's the route I'd take. And do take. The next best option would be to purchase the game for the Virtual Console. I do have a Wii connected to the Internet, though, which you may not have. If you're into retro gaming, you might want to try to find an N64 and the cartridge. Shouldn't be more than $100. But I highly recommend spending the extra dollars to get a Wii and be a retro gamer "in spirit" instead. I might also suggest another option that, if you've taken a look at the media section, you've noticed I've tried out myself, but I might not, because I don't want to hurt Nintendo's feelings with possible misconduct. In the end, the best option fits your particular circumstances (and, erm, demeanor).