Viruses can be prevented by taking sensible precautions, including:
Keeping your operating system up to date.Using up to date anti-virus software.Not opening an email attachment unless you are expecting it and know the source (many email servers scan emails with anti-virus software on the user's behalf).Not allowing other users to use their own memory stick on your system.Only downloading files from reputable web sites.Avoiding software from unreliable sources.