What is a Virus in Simple Terms?

By John King, CISSP, PMP, CISM   Published: 01/01/23   Updated: 11/02/26   3 min read

Short answer: a computer virus is a piece of malicious code that attaches itself to a normal file or program and copies itself when that file runs. It spreads when people open or share infected files, through email attachments, downloads, USB drives and file shares. A worm is different: it spreads across networks on its own, with no file for you to open.

A computer virus is a type of malicious software, or malware, that infects a computer, usually without the user knowing. A true virus attaches itself to other files or programs and spreads when those files are shared, for example through email attachments, messaging apps or file sharing.

Viruses and other malware come in many forms. Some only copy themselves and spread. Others have a specific goal, such as stealing passwords or changing system settings.

Email attachments are one of the most common ways viruses spread. A virus may be disguised as a normal file, like a document or a photo, and sent to many people at once. Be careful with attachments, especially ones you were not expecting, even if they seem to come from someone you know.

Messaging apps and file sharing are also common routes. Peer-to-peer networks are especially risky. People often download files from them without checking what they are, and pirated software is a favorite place to hide malware.

People often use “virus” for any kind of malware. Common types include:

To protect yourself, use up-to-date antivirus software. Be careful about what you download and what attachments you open, and avoid sketchy websites.

A few other habits help a lot:

Computer viruses and other malware can cause a lot of trouble, from slow computers to stolen bank details. The basics go a long way. Use antivirus software, keep things updated and think before you click. Do those three things and your risk drops sharply.

Stay Current

Newer CyberExperts coverage on this topic

This article still works as background. If you want the current picture, start with the freshest related coverage below and today's brief.

Latest Daily Brief

Friday’s brief: Apache’s HTTP/2 fix, then Check Point break-ins, a ScreenConnect add-on and a GitHub secret stealer

The fastest way to catch up on what changed after this article was published.

Read Today's Brief

John King, CISSP, PMP, CISM

John King currently works in the greater Los Angeles area as a ISSO (Information Systems Security Officer). John has a passion for learning and developing his cyber security skills through education, hands on work, and studying for IT certifications.