So this is my third hard drive that I installed on my intel Mac OS X desktop (made in 2007), and I installed Western Digital Black Caviar (which is supposed to last 3 yrs, I believe). But the hard drive is already failing: I hear tapping noises, occasionally, the hard drive clicks just once, and there's been some freezing lately (for example, when waking up my Mac from sleep mode, it freezes on black screen and finally turns on after 15 seconds). Sometimes, Safari freezes, sometimes, I get a scrambled screen with Safari open, etc. Do you have any idea why this is all happening? This Western Digital drive was installed barely two weeks ago, and now it's failing? Maybe the hard drive is not the problem?
If you also experience random crashes sometime it might be a good idea to run Memtest86 to check whether it's actually the RAM that is causing problems.
Also, boot from your installation disk and let Disk Utility verify the harddisk (not SMART status, but the "real" verify which has its own button). If it finds errors, I recommend to buy DiskWarrior to repair the filesystem as in my experience DiskUtils can't repair anything at all.
Failing hard drives tend to cause freezing on your computer, as it takes longer for your Mac to read system files. If you think your HD is failing (as it sounds), it should still be under warranty, so you should be able to get it replaced. You can check your drive status in Disk Utility: http://docs.info.apple.com/article.html?path=DiskUtility/10.5/en/duh1896.html but this check is not always 100% accurate.