Skip to Main Content

Your complete guide to computer viruses and how to protect yourself 

A computer virus is a type of malware that can spread to your computer and cause damage. Computer viruses can steal sensitive information, sap your device’s performance, or completely disable it. Read on to learn what the different types of computer virus are, how they work, and how a cutting-edge antivirus solution like Avira Free Security can help you protect yourself.  


What’s a computer virus? 

A computer virus is a type of malware, usually in the form of malicious code that might be attached to a file or a program. If you open this infected file or program, the computer virus can spread on your device and copy itself. Because it replicates, it can spread to and infect other devices and networks — similar to a biological virus. 

What’s the difference between a computer virus and malware? 

The terms “malware” and “computer virus” are often used interchangeably. However, this is incorrect. Malware is a general term for any type of malicious software. It can take many forms: From viruses and worms to spyware and adware all the way through to ransomware. 

By contrast, a computer virus is a special type of malware. It reproduces itself by inserting its code into other programmes. It also always requires a host program to be able to run. In addition, a user must open the infected file before the virus can become active on the computer. With Avira Free Security, you can surf the internet more securely. 


What does a computer virus do? 

Typically, computer viruses aim to disrupt systems or cause operational problems. Many variants are also used to gain control over devices. Various types of hacker can also gain access to your device, such as through phishing emails, and steal data. 

Likewise, computer viruses can download other malware and cause even greater damage. By replicating itself, a computer virus can also flood networks with traffic — often stopping the device from connecting to the internet altogether. 

How does a computer virus work? 

A computer virus attaches itself to programs or files to reproduce and spread. It often disguises itself using techniques such as encryption to change its appearance, meaning users often can’t spot it. You might receive an infected email attachment, which if opened activates the virus. 

Once the virus is active, it usually changes the way programs work — allowing it to steal confidential information, damage other files, or reformat your hard drive. Likewise, a computer virus saps your device’s performance. It can slow it down significantly or even paralyze the entire system. And if a virus remains undetected, it can quickly spread to other devices. 

What are the different types of computer virus? 

From harmless variants that slow down your device to other viruses that harm your system and cause data leaks, the list is long. In the following, we present the main categories. 

Boot sector viruses: One of the oldest types of virus 

The oldest computer virus is what’s known as the boot sector virus. It installs itself in the boot system of the hard drive, which allows your device to start up. The virus changes the data and settings of the program so that your computer can no longer be started. Nowadays, this type of computer virus is no longer widespread. 

Trojans: Malware that’s everywhere 

One type of computer virus that’s everywhere is the Trojan. They’re used to snoop on personal data and are often hidden in spam email attachments. If you open the attached, infected files or links, the Trojan installs itself on your computer. Among other things, cybercriminals can then view your sensitive information. 

Script viruses: Website scripts containing dangerous content 

This type of computer virus is written in common programming languages such as Java. It’s often hidden in website scripts and is undetectable to regular users or browsers. If your browser runs them, script viruses get onto your PC. Once there, they can go about their dastardly deeds, including renaming or deleting files and sending automated emails. With Avira Browser Safety you are safer from being infected by script viruses. 


Program viruses: Danger lurking in your downloads 

Program viruses get onto your device via programs and files in which they are embedded. If you open an infected program or file, the virus activates. They can usually be found on dubious sites. The key takeaway is: Be careful if downloading programs from unsafe sources. 

Macro viruses: Malicious programs straight from your email inbox 

As a rule, macro viruses are located in files. Similar to a Trojan or program virus, it can install itself on your computer the moment you open the infected file. The virus usually spreads via email or downloads from unsafe sources. 

Computer worms: Auto-propagating malware 

Worms are special viruses that can spread independently and quickly. Unlike other types of computer virus, they can auto-propagate. They mainly end up on computers via what are known as chain emails. Once there, they primarily snoop on sensitive information. 

How do computer viruses spread? 

A computer virus can get onto your device in various ways. Below are some of the most common channels. 

  • Email attachments: A common way devices become infected is through email viruses. They’re disguised as harmless file attachments such as documents or images. However, if you open them, the viruses will infect your computer. 
  • Internet downloads: If you download files or programs from unsafe sources on the internet, you might find yourself downloading computer viruses hidden inside them. The same applies to infected browser extensions, known as bad ons. 
  • File sharing networks: A computer virus can be easily transmitted through file sharing. For example, safe-looking movies may contain hidden malware. 
  • Removable storage devices: Computer viruses can also attach themselves to USB sticks or other removable storage devices. Connect them to your device, and the viruses will infect your PC. 

What are the tell-tale signs of a computer virus? 

If a virus has infected your computer, you need to act quickly to avoid greater damage. But how do you know if your device is infected? We explain below what to look out for. 

  • Slower system: If your computer is more sluggish than usual, this is one of the most common signs that there are viruses on your PC. Both the system itself and applications might run slower. Your internet speed may also be impacted. 
  • Pop-up windows: Another sign of a computer virus is unwanted pop-up windows. If these appear on your computer or in a browser, it’s highly likely that your device is infected. 
  • Self-executing programs: If programs close unexpectedly, they’re most likely infected. If applications don’t start when you select them from the start menu, this is also a sign of a computer virus. The same applies if files open on their own accord. 
  • Device crashes: If your system crashes or your computer shuts down unexpectedly, this is a sign of a computer virus. The same is true if programs crash or you are logged out automatically. 
  • Emails are sent, but you didn’t write them: Computer viruses often spread via email. Among other things, hackers can use email accounts they’ve infected to spread other viruses. If you notice that messages that you didn’t write were sent from your email address, this indicates a virus infection. 
  • Changes to your computer: If you notice unexpected changes to your computer, such as a different homepage, your device is likely infected. The same applies if the browser settings have changed without you making these updates. 

How to remove computer viruses 

If you spot any of the above-mentioned signs of a computer virus, you need to take action. You should remove viruses as soon as possible to avoid even greater damage. In the following step-by-step instructions, you’ll discover how to remove a virus from your PC. 

  1. Download an antivirus tool: If you haven’t already installed an antivirus solution or anti-malware tool, you should do so at the very latest when you notice signs of a computer virus. 
  2. Cut your internet connection: Since viruses can spread from your PC, you should disconnect from the internet. This will prevent your infected computer from spreading the virus to other devices or causing further damage. 
  3. Delete temporary files: You can remove a range of viruses by deleting temporary files. That’s because some variants only activate when you start your computer, so it’s worth deleting all temporary files. That said, this approach doesn’t help with memory-resident viruses because they work directly in the computer’s main memory. 
  4. Restart your computer in Safe Mode: Restarting your device in Safe Mode will minimize damage to your computer. This prevents viruses from running and is a more effective way to remove them. 
  5. Run a virus scan: Now scan your entire device using your antivirus solution. If it detects a computer virus, it will offer you the option to either quarantine or delete it. If you quarantine a virus, it can’t cause any further damage to the rest of your computer. 
  6. Restart your computer: Once you’ve removed the virus, restart your computer as usual — without entering Safe Mode. 
  7. Update your operating system: It’s worth updating your operating system following a virus attack. The same applies to your browser. That’s because both are often updated to fix known vulnerabilities. 

How to avoid computer viruses 

The best way to protect your computer and data is to avoid viruses. The most important thing is to stay alert. 

  • Check email attachments: Never open suspicious email attachments. This is especially true for executable files (they have the extension .exe), as they become active on your computer the moment you open them. You should also be careful with email attachments that have the file extension .html since there might be Trojans or worms lurking inside. 
  • Update your operating system: Also keep your operating system up to date. The updates fix known security holes. This also applies to your browser. 
  • Avoid questionable sources: Only download files or programs from safe sources. That’s because computer viruses or other malicious software might be hidden on unsafe sites. If you run a malware test, you’ll protect yourself. 
  • Use strong passwords: Use strong passwords and avoid using the same password for multiple accounts. It’s also a good idea to change your passwords regularly. This reduces the risk of hackers stealing your data. A password manager can help you with this. 
  • Install an antivirus tool: An antivirus solution, like Avira Free Security, is an effective way to protect your PC from computer viruses and strengthen your IT security. It also helps you prevent malicious EXE files from running on your device. 

With our solution, you’ll enjoy virus and malware protection that helps you shield yourself from the latest known viruses and other threats thanks to its cloud-based detection. If the scanner detects a computer virus, you can quarantine it. The suite also includes a free VPN and cleaning tools for freeing up more storage space. 


This post is also available in: GermanFrenchItalian

Avira, a company with over 100 million customers and more than 500 employees, is a worldwide leading supplier of self-developed security solutions for professional and private use. With more than 25 years of experience, the company is a pioneer in its field.
Avira logo

Surf safe from computer viruses with Avira Free Security — even on public Wi-Fi hotspots

Avira logo

Enjoy increased privacy and protection against a host of computer viruses — with Avira Free Security

Avira logo

Increase your protection against computer viruses when on the go with Avira Mobile Security

Avira logo

Increase your protection against computer viruses when on the go with Avira Antivirus Security