You only get it from opening emails, mate. Just don't open emails unless you know who they are from.
What is ransomware?Malicious software that locks a device, such as a computer, tablet or smartphone and then demands a ransom to unlock it
Where did ransomware originate?The first documented case appeared in 2005 in the United States, but quickly spread around the world
How does it affect a computer?The software is normally contained within an attachment to an email that masquerades as something innocent. Once opened it encrypts the hard drive, making it impossible to access or retrieve anything stored on there – such as photographs, documents or music
How can you protect yourself?Anti-virus software can protect your machine, although cybercriminals are constantly working on new ways to override such protection.
You can get it from surfing porn as well actually. But ransomware is pretty easy to get rid of. It will sometimes just lock your browser. But to get around this just hit CTRL - ALT - DELETE at the same time and then open up Taskmanager. In taskmanager simply select your internet browser and click END TASK. That will do it. Then run viruses scans if you want. You will want ro run 4 virus scans....
Your main virus scan (I use AVAST Free)
Malawarebytes (That's also free to use)
Hitman Pro (Also free to use and standalone. This detects other types of viruses and cirses leftovers that other scanners don't)
ADWCleaner (Also free to use and detects virses and potential virses, also standalone)
These 4 viruses scanners are all you will ever need to deep clean your computer and catch anything on there and totally remove it.
If you get ransomware that can't be solved by the method above, then simply switch your computer off via the power button and then boot it in safe mode and then run those virses scanners mentioned above.