Firstly you should not run into this problem as you should have a backup plan. There's many solutions for this from manually copying important files to another device up to automated full mirror imaging of a drive. Having said that if you find yourself in the situation of having to recover lost files there are ways this can be done.
Windows Fails to Boot
You may be able to boot the computer into windows safe mode to attempt to fix Windows and/or recover your files. There's an article here describing how this can be done: http://www.computerhope.com/issues/chsafe.htm
If that fails there are still more alternate solutions. The Linux crowd is going to cringe when I suggest this but you can always download a version of Linux that can be booted from CD or DVD like Knoppix. I always keep a copy around for this very reason. This is complete operating system stored on a CD or DVD. Generally machines are configured to boot from a hard drive but this can be changed. When you start you're computer you can go into the BIOS setting to make it boot from disk. How to get to the BIOS varies by machine.
This bypasses Windows altogether. Once you boot this OS from the disc you're running an operating system independent of Windows. You can now browse files and move them between devices like drives such as the external drive you just purchased to prevent this from happening in the future.
When you delete something off your hard drive or even reformat a drive the data is most cases is not gone. I recovered the contents of the entire "My Documents" folder off a reformatted drive. All this does is free up the space for other data, it's not truly gone until it's overwritten by something else. Even then in some cases it might not be entirely gone and partial recovery may be possible. The most important thing here is to not use the drive at all as any activity like simply booting it can cause data to be over written.
On a separate computer you can install something like PCInspector. PCinspector and a myriad of other similar programs will search a disk for files that have been deleted and will return a set of results of what it has found and what can be recovered. It will even return results for partial files. You can install the drive that your trying to recover the files from on the second machine to examine the contents.
Note they also have programs like this for recovery of files from flash cards used in cameras and other types of writable memory.
Dead Disk/Disk Errors/Disk Makes noises
This is the most severe situation because the drive is most likely on it's very last legs. If you're experiencing these problems but its still functional I'd suggest immediately backing up all data to an external source. Time is crucial here. Don't turn the machine off.
If it is not functional and the files you are trying to recover are truly irreplaceable and you must get them back there are professional services available for this. They will disassemble the drive and remove the platters which are used to store the data and use special tools to make a recovery. It's even possible to recover data from severely damaged disks like those with water fire or physical damage. These service are quite expensive and results will vary especially in the case of physically damaged platters.
Although its rare some mechanical failures on drives can physically damage disks, use the following information at your own risk. One home brew method for recovery from a bad disk that I've seen many people report being successful at is to place the drive in a plastic bag then place it your freezer overnight. Assuming this works you should be prepared for when you take the disc out of the freezer to immediately place it in the computer to start copying files to another disc as it may fail at some point while copying. In that event refreeze it and repeat the process. You may be able to do this many times before it really dies.