Most computers come with "recovery" CDs or partitions (separate areas on your hard disk). Often, you can press a "function key" during the "boot" (power up) process and restore your computer to the state when it came out of the box. That is all well and good but all your "personal" data is, dreadful sorry, lost and gone forever. Obviously the first step is to backup your "personal" data.
Personal data can (and should) be stored outside your computer. Fortunately, there are lots of options. Probably the least expensive method is to create DVDs and CDs. The media is cheap and upgrading your computer, inexpensive. Most recent computers come with a CD or DVD burner. If you don't have one, you can buy one on-line for around $30. Installation is not difficult and professional installs cost about $35.
Knowing what to back up requires some thought. The best way of identifying what to back up is to take note of what you use and what you would like to have if you were setting up a new computer. Most computers accumulate lots of "trash" you can live without. It is a judgment call and you are the best person to make that decision.
One popular alternative to burning CDs and DVDs is the USB memory stick or flash drive. 16 gigabyte (9 zeros) devices can be bought on-line from Hong Kong or Taiwan for less than $20. 8 gigabyte devices can be bought in your local "big box" store for about the same price. If you have a lot of stuff to back up, external terabyte (12 zeros) drives can be bought for around $100.
Once you are comfortable with the notion of getting back in production on a new (or different) computer, you can (and should) consider what you can do if your computer becomes dysfunctional. Note that you should do this while your computer is still fully functional. Most of the computers we see are far beyond this point. For them, the repair cost is an object lesson. Confident that my readers are provident, I will plunge into a discourse on "partition imaging".
Our hard drives are single physical units. Our operating systems view drives as one or more "logical" units called partitions. The raw physical drive is carved up and each piece is formatted or organized into smaller units that contain our data and programs. Hard disks can be "imaged", but those images can only be restored on the same size or larger hard disk. Partitions are more malleable. They can be de-fragmented and resized (shrunk) such that they can be restored to any partition of adequate size.
De-fragmentation touches areas on your hard disk that would otherwise lie dormant. The goal of any defrag program is to rearrange storage units on a "live" operating system. That means it may run into damaged areas and in the worst case fail leaving your hard disk unusable. Another reason that back up should be your first priority. Fortunately there is a free defrag tool, Defraggler, available from filehippo.com.
Resizing partitions is no less problematic. Normally the system is "booted" from a "live" CD which leaves the regular hard disk quiescent. Several CD images are available free including SystemRescueCD which has extensive documentation which you will need. Don't forget that Google is your friend - some wisdom can be found here.
If you have made it this far, the final step is Clonezilla. Clonezilla was developed at the National Center for High-Performance Computing in Taiwan. The fancier aspects are intended for use in computer laboratories such as those found in schools and libraries. For most end user applications the live version is adequate. The download is not huge but dial up users may want to prevail on their ISP to provide them a copy. Once you have the "iso", you can burn it to CD with ImgBurn, a free application from filehippo. Step by step instructions are provided.
I spent much of two days making mistakes using the software but I think I am now over the hump. I've imaged two machines and restored one successfully. I now know that partition images are preferable to disk images and how to make my Windows machines talk to Samba on Ubuntu. My wife can now browse her backups in Firefox and Internet Explorer. Best of all, it was all done with "free" Open Source Software..
So why would anybody make this sort of intellectual investment? Simple. The next time someone fouls up your machine, you can restore it in 10 minutes or less absolutely free. No need to fear infections picked by an aggressive surfer (that might be you) and the bill from having us repair your system..