So, there are a few software options out there, but I use one called Macrium Reflect (before anyone says anything, no I do not have any connection with this company!)
Basically you install this on the PC you want to protect and set it up on a schedule so that it creates a daily (or weekly or whatever you choose) "image" of your HD and either stores it somewhere else on your network or onto an attached portable hard drive.
The image is basically a perfect copy of everything on your hard disk.
I use what is called a NAS (Network Attached Storage) which is just a big hard disk that connects to my network (so it plugs into the router), but you could just as easily do this by plugging a portable USB hard drive into the computer.
As part of first setting up the software you would also create what is called a "recovery disk" which is typically one of those little USB keys/drives. What the software does is copy some special files onto this little disk so that it's super easy to copy
the image back onto your hard disk if something goes wrong. You only do this once, and then you just keep the USB key safe somewhere.
If something goes wrong such as has happened to people in this thread then you just put in the little USB key, and boot up your computer, most likely you need to press a certain key while you do this so that it boots from the USB key instead of your broken/corrupt
hard disk and then the software copies the image from wherever it was stored back onto your hard disk so that you're then back to where you were at the time of the back up.
It maybe sounds complicated, but once you've set it up you can pretty much forget about it although I tend to just open the software and look at the logs in case it had any problems making the backup.
Macrium has a free version which has a few limitations and then various paid options to do stuff like make the back ups more efficient/smaller/quicker etc, but like I say, there are others out there which might be as good or better.