Ransomware is a type of malware that, once it infects your computer, encrypts all your files. To recover them you have to pay a ‘ransom’, an amount of money, after which the malicious actor claims he will (there are no guarantees) send you a key so that you can decrypt your files. While Trojans or viruses are an annoyance, ransomware is particularly destructive for business since every hour lost can also represent a significant financial loss.
The question then becomes ‘How to block ransomware?’. First of all its important to not get infected in the first place. The malware is usually concealed in a link in an email message which, once you click the link, installs it on your machine. The other attack vector is downloading software that contains the malware. So you can block ransomware by never clicking on links in emails from sources you do not know or trust and never downloading software from other than a trusted source, such as the manufacturer of the software.
There are various security utilities that can detect this type of malware but malicious actors are constantly modifying the way they deliver it so that it is undetectable once installed. Detection of malware based on the way it operates is a better option. These programs typically target documents on the Desktop or located in the Documents folder. Some anti-virus tools maintain a list of programs that are allowed access and prevent any unauthorised software from accessing these locations and will alert the user asking for authorisation.
Ultimately, the best solution is to use a backup utility to keep a copy of your data, especially essential files, in a safe location (either a physical disk or through cloud storage). You should also have a system disk handy to perform a re-install of your system since this is the only way to be sure the malware has been removed from the system. You should be aware, though, that some particularly devious versions of malware may also attempt to encrypt your backups (if they are done using a virtual disk, for example, that is visible in your system). An off-site backup is the best solution.
In conclusion the best way to block ransomware is to prevent it gaining a foothold in your system by being especially careful what links you click on and software you download. There are various utilities that you can install that detect and prevent ransomware from operating but none are 100% effective. Make sure you make regular backups of your data so the, if the worst does happen and you are infected, you have a copy of your data available.