The best way to prevent the effect of viruses is by installing and updating antivirus software. Antivirus software is designed to detect, prevent and remove harmful software such as viruses, malware, and spyware from your computer. It works by scanning your computer regularly for any signs of these types of threats and taking action to remove them. Updating the antivirus software regularly ensures that it can detect the latest viruses and protect your computer from them. Additionally, being cautious when opening emails and attachments, downloading software from trusted sources, and keeping your operating system and software up-to-date can also help to prevent virus infections.