What Is a Computer Virus and Should You Worry About It in 2024?

As technology gets more sophisticated, you may think a computer virus is a thing of the past, but they may be more worrisome today than ever before.
We receive compensation from the products and services mentioned in this story, but the opinions are the author's own. Compensation may impact where offers appear. We have not included all available products or offers. Learn more about how we make money and our editorial policies.

A virus is a malicious software program that enters your device without your knowledge. It then spreads throughout your computer and performs an attack on the network. Third-party tester AV-TEST Institute records 450,000 new malware threats each day.[1] 

Keep reading to learn more about what a computer virus is, why you should still be concerned about online security, and what antivirus programs are best for protecting your devices.

In this article
Computer virus
Viruses vs. malware
Types of viruses
How does a virus spread?
How to remove a computer virus
FAQs
Bottom line

What is a computer virus?

A computer virus is a software program with malicious intent. The purpose of the virus is to perform actions without the device user’s knowledge or consent. The program uses malicious code to complete a destructive activity on the device or network.

Computer viruses sometimes get designed to steal your private data. That could be health information or your financial data. In businesses, a computer virus can bring operations to a halt.

Sometimes viruses get created to interrupt network services. That stalls any work you might need to perform on the device. They can get into the local file system and cause damage that may be difficult or even impossible to repair.

Viruses vs. malware: What’s the difference?

Malware and viruses get thought of interchangeably at times. Malware is an umbrella term that includes spyware, viruses, worms, and any other malicious software.

Viruses and malware are two of the most common terms heard in relation to computer security. Viruses and malware both refer to malicious software programs that can cause damage to your device or system. 

The difference 

The main difference between a virus and malware is the way in which they spread across multiple systems. A computer virus replicates itself, usually through networks or file-sharing methods, but not all types of malware replicate themselves. Instead, malware can also be spread through email attachments or malicious websites. 

While both viruses and malware can cause harm to your system, viruses are more likely to infect multiple machines than malware. Additionally, viruses often contain additional malicious code within the payload that can lead to other forms of cyberattack such as data theft or unauthorized access.

Types of computer viruses

Some computer viruses may come as attachments through trial software or email. Other viruses may get replicated by video files. You should know how the different viruses work so you can protect yourself against online threats.

Boot sector virus

A boot sector virus is a malicious program that spreads by infecting the boot record on diskettes or hard drives. It’s designed to replicate itself when the host machine is booted up, meaning each time you start your computer, the virus copies itself onto another device connected to it such as a USB drive or external storage device.

This particular type of virus was very common in the past but due to modern security measures, its frequency has decreased significantly over time.

Browser hijacker

A browser hijacker is a type of malware that modifies web browser settings without your permission. It typically alters your browser home page, search preferences, and other settings to redirect traffic and display pop-up ads while browsing.

The hijacker gets revenue from the ads you view. Many browsers try to keep online viral threats to a minimum, but using reliable antivirus is necessary to reduce the risks as much as possible.

A classic example of a browser hijacker is CoolWebSearch (CWS). The hijacker redirected Internet Explorer users to its own website whenever they tried to access certain sites on the web. It also changed the default search engine, took over homepage settings, and distributed advertisements on the web pages viewed through the browser.

File-infecting virus

A file-infecting virus is a type of computer virus that infects executable files, including those with the .exe, .com, and .bat extensions. This type of virus usually gets into the system through vulnerable software, emails, or websites and can spread to other computers on the same network.

Consider an email attachment containing a malicious file posing as a legitimate document such as a PDF. When opened, it runs an executable program that might change the desktop background image, disable antivirus protection, or create new folders in specific locations on the hard drive.

This malicious code contains instructions to replicate itself across multiple systems by copying itself onto removable media, downloaded software, and email attachments.

Macro virus

A macro virus is a computer virus that uses the scripting language of an application to automatically execute malicious code on a user's machine. Macro viruses can spread quickly since they often take advantage of features like mail merging or automatic data entry in popular applications such as Microsoft Office or Adobe Reader.

For example, a macro virus might be hidden in an infected Excel file sent as an attachment in an email. When the recipient opens the file, they may not immediately see any malicious actions, since this type of virus is executed when the infected macro is run.

This type of infection could allow the sender to access confidential documents or personal information stored on their machine or even sabotage it with malware payloads such as ransomware.

Multipartite virus

A multipartite virus operates by replicating itself in two or more parts and using different methods for replication. The primary component may reside in the boot sector of the hard drive while the secondary component replicates itself in other file types such as executables.

When someone downloads a malicious program or opens an infected email attachment, the primary component of the virus infects the boot sector and then replicates itself in other files. By doing this, it can spread quickly to other computers on a network or through the internet.

Overwrite virus

Overwrite viruses are a type of malicious computer virus that destroys any existing data on the system once it has been activated. This type of virus is particularly dangerous because it can damage important files, documents, and other data stored on the infected system, making it impossible to recover or use them again.

Imagine you’ve been working for months on a novel and just finished writing the final chapter when your computer becomes infected with an overwrite virus. If you haven't backed up all your work to another device or online storage service, as soon as the virus was activated all that hard work would be gone forever — wiped!

Polymorphic virus

Polymorphic viruses are a type of malicious software that can modify its own code in order to be able to infect more devices. They are one of the most difficult types of virus to detect and remove because they constantly change their form.

One example of a polymorphic virus is the WannaCry ransomware. This virus spread around the world in 2017 and infected hundreds of thousands of computers through email phishing campaigns.

This malware targeted Microsoft Windows systems by exploiting a known vulnerability in the operating system. Once inside, WannaCry encrypted important files and asked users to pay a ransom fee in order to access them again.

Resident virus

A resident virus is a type of computer virus that can stay in the computer's random access memory (RAM) and continually replicate itself. Resident viruses are often used by malicious actors to spread quickly across computers and networks, allowing them to cause significant damage.

A good example of a resident virus is the Jerusalem virus, which is a computer virus that was first identified in Jerusalem, Israel, in 1987. It works by replicating itself on computers running Microsoft DOS, which allows it to remain resident in memory and become active whenever DOS is used.

Spacefiller virus

The spacefiller virus, also called a cavity virus, works by replicating itself and filling up empty space inside program files.

As with other malicious programs, the spacefiller virus is designed to spread rapidly by attaching itself to executable files or email attachments. Once it infiltrates a system, it begins replicating itself in all available storage spaces, including RAM and disk drives.

Trojan horse

A Trojan horse is a type of software that disguises itself as legitimate software. Its primary purpose is to gain access to, or control over, a computer system without the owner’s consent or knowledge.

Unlike other malware, such as worms and viruses, Trojans do not replicate themselves and are not self-propagating. Instead, they must be manually installed by an attacker in order for them to be effective.

An example of a real-world application of the Trojan horse virus is a financial institution being targeted by malicious actors. In this scenario, the attackers can gain access to the institution’s computer systems using a Trojan and then use the system to transfer funds from the institution’s accounts without its knowledge or consent.

Web scripting virus

Web scripting viruses are malicious programs that use web-based programming languages, such as JavaScript or VBScript, to alter the behavior of a website.

These types of viruses are particularly dangerous because they can spread quickly across large networks and can cause significant damage to infected systems if left unchecked. To better understand how this type of virus works, let’s look at an example.

The Nimda virus, which was first detected in 2001, is a good example of a web scripting virus. The virus uses the Windows Scripting Host (WSH) to spread itself through email messages and internet downloads.

What makes the Nimda virus especially dangerous is that it exploits weak passwords and unpatched security vulnerabilities to gain access to other computers on a network as it spreads.

Are keyloggers a computer virus?
Keyloggers are a type of virus called rootkit viruses. They can be particularly malicious if they infect your operating system, but some keyloggers also infect your web browser. A keylogger can be an especially dangerous type of malware since it logs your keystrokes — making it easy for someone to hijack your passwords or personal information.

How does a computer virus spread?

Computer viruses can spread through email, removable media, and internet downloads. Sometimes packaged software comes with an attached virus.

Opening emails from people or organizations you don’t recognize can make you easy prey for hackers. Often, an attachment gets included that comes embedded with a virus. You can protect your computer by knowing the reason behind any email attachment before opening it.

Removable media, like USB drives or external hard drives, are not allowed in some organizations because they can ‌spread viruses. When a device is part of a network, the computer virus can spread across the entire network before it gets noticed.

Many businesses have cracked down on computer security because of cyberattacks. In 2020, a computer virus at a healthcare facility forced a network shutdown, costing millions of dollars.

Packaged software and internet downloads can have hidden viruses embedded. You may install a program or update you needed and not realize a virus lurks in the background.

How to prevent computer viruses

When it comes to protecting computers from viruses and malware, prevention is the best protection. There are a number of steps you can take to help ensure your computer is safe from malicious attacks:

1. Use antivirus or anti-malware programs

Antivirus or anti-malware software can detect and remove malicious files before they cause any damage to your computer.

Make sure you regularly update the software so that it can protect against new threats as they emerge. It's also a good idea to run regular scans of your system in order to ensure any virus or malware hasn’t slipped past the defenses put in place by your antivirus program.

If you're not sure which antivirus is best for you, here are the top three programs we recommend:

  • AVG: A highly customizable antivirus with lots of scanning options, AVG is a force to be reckoned with. It includes Wi-Fi security to ensure you're not hopping onto a malicious network, an unsafe email attachment blocker, and phishing protection. Its free app even comes with spyware and ransomware protection.

    See AVG Plans | Read Our AVG Review
  • TotalAV: We love TotalAV's clean and clear interface, and it boasts excellent protection ratings to boot. This includes real-time phishing protection with Total WebShield, which warns you if a link you're about to click could lead to a malicious website. Additionally, you'll get ransomware protection and, depending on which plan you choose, access to the TotalAV VPN.

    See TotalAV Plans | Read Our TotalAV Review
  • McAfee: Need to keep tabs on your child's browsing activity? McAfee lets you check what they're doing on their device as well as the device's location so you can be sure homework is getting done. McAfee also protects the whole family's devices from phishing and ransomware, plus it protects your webcam from hijackers.

    See McAfee Plans | Read Our McAfee Review

Trusted Protection by 435 Million Users Worldwide
4.8
Editorial Rating
Learn More
On AVG's website
Antivirus Software
AVG
  • Award-winning antivirus, malware, and ransomware protection for up to 10 devices
  • Includes webcam protection, safe browsing and email, automatic updates, and 24/7 protection
  • Suite of protection benefits including a secure VPN, anti-tracking capabilities, safeguards against phishing sites, and more

2. Update your devices and apps

Another important measure is keeping both your operating system and any applications you use up to date.

Operating system updates often contain security patches in order to protect against new threats, so make sure you install these as soon as they are released. This is especially important for older systems that may no longer be supported by the manufacturer.

3. Update your router’s firmware

If you’re connecting your computer to a network, it’s important to ensure it is well protected from malicious attacks. Make sure all your network routers and switches have their latest firmware installed and that appropriate firewalls are in place.

4. Don’t use unsecured Wi-Fi

Never leave your computer connected to an unsecured Wi-Fi connection, as this can put you at risk of both viruses and hackers accessing your data without permission.

You can use a virtual private network (VPN) to encrypt a public Wi-Fi connection and improve your online security.

5. Double-check before you click

Always remember to think before you click. Be suspicious of any emails or links sent from unfamiliar sources and never download any software from untrustworthy websites.

6. Use strong passwords and MFA

Make sure to keep your personal information secure by using several strong passwords for all your accounts and backing up your files regularly in case of a system crash. It’s also a good idea to use multi-factor authentication (MFA) to add an extra layer of security to your accounts.

By following these steps, you can ensure that your computer is well protected against viruses and other malicious threats.

How to remove a computer virus

If your computer is infected with a virus, it’s important to take the necessary steps to remove it as quickly and efficiently as possible. A computer virus can cause havoc on your system, so getting rid of it should be a top priority.

1. Install an antivirus

The first step in removing a virus is downloading and installing an antivirus program that can recognize and detect malware threats. There are many reliable antivirus programs available, so choose one that best suits your needs. We found AVG to be one of the best during our antivirus tests.

4.8
Editorial Rating
Learn More
On AVG's website
Antivirus Software
AVG
  • Award-winning antivirus, malware, and ransomware protection for up to 10 devices
  • Includes webcam protection, safe browsing and email, automatic updates, and 24/7 protection
  • Suite of protection benefits including a secure VPN, anti-tracking capabilities, safeguards against phishing sites, and more

2. Disconnect the internet and reboot in safe mode

Once you’ve installed the program, disconnect your device from the internet to prevent further spread of the infection.

After disconnecting, reboot your computer into safe mode, which limits the available programs and features. This provides an opportunity to delete any temporary files that may have been created since the virus was installed.

3. Run a virus scan

Next, you can run a virus scan with your antivirus program, which will identify and locate any malicious software or viruses on your system.

4. Delete or quarantine infected files

Once your antivirus locates the threat, you can either delete it or quarantine it depending on the severity of the infection.

5. Reboot your computer

After removing the threat, reboot your computer in order to ensure that all changes have taken effect before reconnecting to the internet.

6. Update your passwords, apps, and operating system

You should also take this opportunity to change all passwords associated with online accounts connected to your device as well as update software, browser, and operating system versions accordingly. This step is necessary in order to reduce any further risk of exposing your device and data to malicious threats.

By following these steps, you’ll be able to safely remove a virus from your computer. It’s important to remember that prevention is the best way to protect yourself, which is why it’s recommended that you install antivirus software before even encountering an issue.

If you need to juggle a lot of passwords or just have trouble remembering a few, a password manager could help.

FAQs


+

What are the 10 most common types of computer viruses?

Unfortunately, viruses can sneak onto almost any device, and some are more prevalent than others. Here are ten of the most common computer viruses:

  1. Macro virus
  2. Boot sector virus
  3. Trojan horses
  4. Overwrite virus
  5. Browser hijacker virus
  6. Web scripting virus
  7. Polymorphic virus
  8. Resident virus
  9. Multipartite virus
  10. Spacefiller virus

+

What was the first computer virus?

The first known computer virus was the Creeper system created in 1971.


+

Who named the first computer virus?

Bob Thomas named the first computer virus after a Scooby-Doo character.


+

Who created the first computer virus?

Bob Thomas created the first computer virus for BBN Technologies in the U.S.

Bottom line

A computer virus is a software program that is usually designed with malicious intent. It spreads through a computer by email, peripheral devices, and internet browsers. With more viruses getting created every day, these threats are still relevant. 

Make sure to use the best antivirus program.

No Fuss, Real-Time Online and Mobile Protection
4.7
Editorial Rating
Learn More
On TotalAV's website
Antivirus Software
TotalAV
First year discount on paid plans
  • Real-time protection from viruses, malware, and online threats
  • Blocks tracking cookies and ads, proactively monitors for data breaches, and option to schedule smart scans
  • 100% compatible with Windows, Mac, Android, and iOS operating systems on up to 3 devices
  • Lacks firewall protection

Author Details
Patti Croft is a seasoned writer specializing in technology, with three years of experience. With a B.S. in Computer Science and a background as a technical analyst and security specialist, she covers a range of topics like data security and parental control software.
Ryan Clancy is a freelance writer and blogger. With 5+ years of mechanical engineering experience, he's passionate about all things engineering and tech. He loves bringing engineering (especially mechanical) down to a level that everyone can understand.

Citations
[1] Malware