Frequently all that has happened is the directory on the hard drive has been shot. Apple's own Disk Utility on the Installer CD can repair directories that are only partially damaged, using the First Aid tab in the Installer menu's Disk Utility. Be sure to select the hard disk in question, and hit repair disk. If the disk can not be repaired by the Installer CD's Disk Utility after four tries, the directory is more badly munged. Disk Warrior can repair disk directories that have gone south by replacing them with a known good working directory. So before you think your drive gone since it won't mount on the desktop, be sure to check if all it needs is a new directory.
Two common causes of munged directories are improperly shut down computers (you must shut down from the Apple menu in Mac OS X and Special menu in the Finder of Mac OS 9 and earlier), and Norton Systemworks or Utilities Disk Doctor and Speed Disk which don't understand HFS+ entirely causing the directory to go south. A kernel panic will result in an improper shut down as well, and it should be resolved and the directory repaired prior to your considering the hard drive a goner.
Hard drives can fail because they are not properly shielded against sudden vibrations caused by riding on buses, dirt roads with frequent potholes, or going through numerous earthquakes. Don't move farther than one local with a notebook computer asleep, as its hard drive heads are not parked and can get damaged if the drive is moved around too much while the drive heads are not parked. Shutting down the computer will park the hard drive. Some can fail because lightning struck the outside of the house and got electricity into the motherboard and strike the controller chip. The best prevention is to keep a separate Backup Firewire or SCSI hard drive with Carbon Copy Cloner or Retrospect Express, and to leave all computer devices unplugged for cable, phone, or power when a thunderstorm approaches.