In some cases, you can recover or restore previous versions of your files. However, the following conditions must be in place:
System Restore Point must have been turned on before you were infected with the malware.
You must already have detected and removed the malware, and there can be no traces of it on your PC. You can use Windows Defender Offline to fully clean your PC.
Your files must be on the same PC you're using to recover them (they can't be on a network or removable drive).
If you've been infected by the Crilock family of ransomware (also called CryptoLocker), you might be able to use the tool mentioned in the MMPC blog:
OneDrive for Windows 8.1 also has a means of restoring previous versions of Microsoft documents. Similar to System Restore Point, you can look at the version history and recover files:
Right-click on a document and click Version history.
You can then look at previous versions of the document, so you can go back to a version that hasn't been encrypted or changed by malware.