Whether you're dealing with deleted files, encrypted files or a damaged hard drive there are options to recover your lost files. The most important thing in all of these scenarios is to stop using the affected drive as soon as possible. The more you use it the lower your odds of successful recovery become.
Most modern file systems never actually get around to deleting files, even after purging your recycle bin, they merely delete the reference to it in the file system and leave the actual data in place until a newer file overwrites it. While this can be vexing for those trying remove incriminating evidence from their computer it's great news for those who just deleted a file they need to get back. A file scraping program such as Photorec will examine your disk block by block and find contiguous blocks that can be reclaimed as all or part of the original file. Because it ignores the file system Photorec can be used on Windows, Linux and Mac machines and despite the name can be used to find many different types of file. There is a companion program TestDisk which can be used to repair broken file systems, partition tables and missing boot records. These are both command-line programs so windows users may prefer to check out Recover or Recuva for an easier to use graphical option.
In recent years a particularly nasty type of malware has emerged called ransomware. This is a virus that encrypts your files or locks your computer then pops up a message instructing you to send a bitcoin ransom to an anonymous address and hope the author sends you back a decryption key. Some of these have been cracked by AV companies and some have not so before paying a ransom try the following steps.
If your variant is not listed you may also be able to recover your original files by using one of the data recovery tools listed in the "Deleted Files" section above due to the fact that after encrypting and renaming your files most ransomware will delete the original making it recoverable using standard file recovery tools or in the case of Windows there may be a shadow file you can access using shadow file browser.
If your drive is making strange clicking or grinding noises that's a good indication that you have a physically damaged drive. The good news is you can probably still recover your data by taking it to a specialist data recovery firm such as Payam, the bad news is this will likely cost upwards of a $1000. Do not attempt to take apart the drive yourself unless you have a Class-100 clean room otherwise dust and other air-borne particles will damage your platters. If this is more than your data is worth then one trick worth trying before you throw the disk out is to put it in a waterproof bag then place it in a freezer for 30-60 minutes. Often this will shrink the metal elements enough to give an otherwise dead drive 20 minutes or so of life that you can use to recover important files.
If your drive is failing to spin up or is completely inert the problem may be a broken PCB (printed circuit board). For older hard drives recovery can be as simple as buying an identical model and using the PCB from that. Modern HDD's have an embedded microcode that is unique for that particular drive only although specialists like Payam or Data Detect can work around that.
Finally if your drive is an external USB drive the problem may be as simple as replacing the SATA bridge card. This is a $20 add-on that converts an internal drive to a USB one and can be easily replaced by cracking open the plastic housing of your external drive. Alternatively you may just want to pull the drive out and install it inside your computer.