Having your computer infected with malicious code is a difficult experience. The person whose device gets infected is not wholly innocent however. Unless the virus is on a device beforehand, there are typically four types of actions that can result in malware getting on a computer. Understand what they are and avoid them.
Downloading torrents is a quick way to get a virus. Downloading a torrent file also exposes your IP address to the public if you are not using a VPN or other method. That sharing, which makes the torrent process possible, is the same thing that makes your system vulnerable.
Illegally-activated programs can be downloaded on such sites. The people who cracked the program are the same people who can install malware onto the file. An estimate from several years back estimated that 1/3 of user visiting torrent-related sites get infected. Techniques exist that make downloading torrents safer. But when it comes to cybersecurity, stay away.
2. Adult Websites
Visiting adult websites can lead to having your computer compromised. Much like Torrent sites, websites with adult material can serve malware-infecting content. The content can be in the form of material downloaded or served up by just visiting in the form of "malvertising". Malvertising infects users computers by showing in the browser. Organization policies likely forbid visiting adult websites on company computers. This method of acquiring a virus makes the user especially guilty.
Picking up a thumbdrive laying around can be a convenient solution to transferring a file. But that convenience comes at the cost of risking malware from coming to the computer it's plugged into. The virus can spread from computer-to-computer any time a USB is plugged in. There are ways to make USBs more secure with passwords and encryption, but transferring files in a secure digital-only format is more secure.
Getting a virus from a phishing attack is another possibility. Phishing attacks can succeed on even a sophisticated user. The emails are disguised to fool the user into taking an action like clicking a link that installs malware. The email might imitate a person in your company or look like it's coming from an organization that someone is familiar with. There are methods to detect phishing like paying close attention to the email address it is coming from and the link URL. For a complete list of tips to avoid phishing, download this guide to preventing phishing.