Perhaps the most dreaded failure is a hard drive crash. While drive failures can’t be prevented, they can be reduced in number.
Pay attention to error messages. Sometimes a drive will alert you to the fact that it is reaching the end of its useful life by reporting sector errors. If that happens, backup the data and replace the drive as soon as possible. Consider replacing the drive with a solid state model which generates less heat. Heat is the number one enemy of a working computer.
Leave the drive turned on when the computer is just hanging out on the desk. Turning it on and off causes it to wear out sooner because of the rapid fluctuations in heat. A better alternative is to use the hibernate mode when not in use.
Shut the system down immediately if the system issues a heat-related error. Some systems have an internal temperature threshold setting that if reached, the system sends out alerts. Ignoring the alert will almost guarantee that the heat will fry one or more components. Don’t even back the system up before shutting it down. Let it cool off completely before attempting to reboot and attempting to back up data.
Make sure your system is well ventilated. Don’t block the airflow by putting books, papers, etc up against the system, especially near the air vents or exhaust fan. Keep the processing unit vents free of dust. Desktop units that live under the desk on a carpeted floor are most susceptible to dust buildup because the vents are out of site and the carpet is rich source of dust and lint. Check to be sure that all vents are clear and the fans are running properly.
And most importantly, be proactive. Make sure that critical data is backed up at all times. Restoring data to a new system is the unavoidable result of a hard drive failure. Not having any data to restore is far worse. Two terrabyte external hard drives cost about $150 and come with software and instructions for automating the backup process.