I recommend that you buy an external harddrive that you only plug into your computer while you are doing a backup. It is in my opinion the best way to protect your data from ransomware. Some people also use harddrives of their previous computers for backups, there are casings you can buy to attach them externally.
There are also options like Dropbox and SkyDrive that will send your data to the cloud and are very convenient. But files in the cloud can be affected by ransomware (though, you can roll them back to previous versions) and you are also giving your files to a company, which is something you need to be comfortable with. Using the cloud is more convenient than external harddrives, but a bit more insecure.
All options cost some money.