A few things can be done to stop viruses from being put onto your website. If the content you put up are simply HTML pages, it's a good idea to perform a Malware scan on your PC using a program such as MalwareBytes or SUPERAntiSpyware. It's also a good idea to make sure your cPanel password (the same as your FTP software) is a strong password, so that it isn't easily guessed by someone who may have figured out your cPanel username. If you are using CMS softwar, forum software, etc, it's also a good idea to make sure you are keeping up with any updates released for the software, as they tend to come with many security fixes that could let someone for example, inject code into your site.