#1 Keep your systems patched!
Stay on top of getting your updates installed for all software on your computer/mobile device.
Security experts advise to install the Microsoft fix—MS17-010—right away. Following the installation, make sure to reboot the system. Microsoft even released it for systems that are no longer officially supported, such as Windows XP or Windows 2003. Seriously, install it right now; it’s very important.
#2 Beware: Never open spam, click email links or attachments!
Always check sender of the email and always verify their legitimacy before opening any email.
Do not to visit the untrusted website or follow the links that are provided in the emails by untrusted sources.
#3 Install & Update antivirus!
Make use of your antivirus software’s ransomware removal tool, which should scan for and wipe out any ransomware attempts found on your computer.
Most paid subscriptions use real-time protection to keep their clients safe. After antivirus updates it should clear the intruder from your system.
#4 Backup your FILES immediately: Cloud & Offline Backup!
It is highly advised, in order to protect yourself from being held hostage to data thieves, to create secure backups of important data on a regular basis. Simply backing up is not enough though, as physically disconnecting the storage device is required to avoid it being infected with ransomware as well. Cloud storage is another option to use, but it makes your data vulnerable to all other kinds of attacks.
#5 Use Pop up Blocker
Pop Up Blockers disable any pop-up, which could be used by hackers to send you malicious advertisements. My Choice is Adblock Plus
#6 Limit the use of Microsoft Office Macros:
A lot of Ransomware is spread using Office attachments. Microsoft recently published an add-on which can stop you from enabling macros in documents downloaded from the Internet. Some more reading here.
#7 Disable SMBv1
A lot of press has been focused on SMBv1 which is an old Microsoft file share technology. If you apply the patches mentioned in Number 1 then SMBv1 is disabled.