I can't say it enough. Back up your hard drive. I'm going to talk here about what I recommend as the best way to protect yourself from a catastrophic hard drive failure. Keep in mind that what follows is just one of many ways to protect your Mac.
This will cost you. You need to purchase an external hard drive to use with Time Machine. When your internal hard drive fails, you will then need another external hard drive to restore to from Time Machine. You will be using that new external hard drive to work from until you're ready to repair your Mac.
The Time Machine basics:
The size needed for this hard drive depends on how much space you expect to use on your internal hard drive. If you're currently using only about 30GB of your 500GB hard drive and you don't expect to be adding a lot of videos or photos in the future, then you can safely use a 120GB hard drive. In other words, your Time Machine backup drive should be about three times the size of what is being used in your internal drive. You need the extra size because the Time Machine keeps a running history of all the changes you make.
If you want to be able to go back in time by several months to recover a lost file or an older version of a file, you need the extra size. If all you want to do is keep a few days or a few weeks of older versions then an external drive a little larger than what you currently use would be sufficient and save you money. For example, to back up 30GB, use a 80GB hard drive. Good luck finding one that small.
When the Time Machine is disk gets full it just removes the oldest backup to make room for the new backup. Hence, the smaller the external hard drive, the less history you can save. It should be noted that if the Time Machine disk is small, it will need to frequently delete an older backup to make room for a new one, and that takes more time.
The interface for the Time Machine disk can be USB 2.0 or Firewire 400 or Firewire 800. If you don't mind that it takes a long time to perform a backup (many minutes instead of a few minutes) then use USB. Time Machine works in the background. Still, when it does run, it requires computer resources. If you don't like being slowed down a little while Time Machine is running (about every hour), then find a hard drive with a Firewire 400 or Firewire 800 interface (800 is faster than 400) - and be prepared to pay a lot more. Alternatively, turn off Time Machine when you are using the Mac and turn it back on when you're away from your Mac (the Mac has to be on and not asleep for Time Machine to work; the display can sleep, but not the computer).
Here are Apple's instructions for setting up Time Machine. The type of interface to choose for the new external hard drive you intend to use as a temporary startup disk is up to you.
Recovering from a failed internal hard drive:
This is rather simple.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20110423172432901