Hard drives form the basis of our computing. The use of computers comes down to manipulating data, and the hard drive is, of course, where we store all our data; family albums, music, work documents, email, the list goes on.
Most of the components in your computer are electronic devices. They don't fail with time like a mechanical device such as a car. But your hard drive is one of the few mechanical devices used in modern computing, and as such, it's destined to die eventually.
Logical failures occur when the electronics of the hard drive failure or the software (firmware) has a problem. This kind of failure is usually the cheapest and easiest to have fixed. Unfortunately, it's also an uncommon failure.
If the hard drive has been handled roughly, or the magnetic platters are scratched, have read/write errors or low-level formatting problems, this is a media failure. These are also relatively uncommon. Once the platters are scratched, the data should be considered scrapped.
A head failure occurs when the read/write head crashes into the platters (the head crash), has an "improper flying height" or the wiring between the logic board and the head is faulty -among other failures related to malfunction of the read/write head. This is a common failure. The head crash is particularly nasty.
Mechanical failures probably make up the bulk of hard drive failures. The motor burns out, the drive overheats, bearings get stuck -the kind of thing you'd expect to find when a car fails. These can be nasty but if the failure didn't affect the platters, you might have a chance of recovery, but at a cost.