What Is a Computer Virus

A computer virus is a type of malware — malicious software written on purpose to do harm — and specifically the kind that copies itself into other programs or files so it can spread, much the way a biological virus hijacks healthy cells to make more of itself. Because, as the how-programs-run topic explained, a program is just instructions the computer will faithfully execute, a virus is nothing magical: it is a program whose instructions happen to be harmful, and the whole problem is getting the computer to run it in the first place. "Malware" is the umbrella term, and a virus is only one member of a family worth telling apart: a true virus attaches itself to a legitimate program and runs when you run that program; a worm is similar but spreads on its own across the networks from the internet topic without needing you to open anything; a trojan disguises itself as something useful or harmless so that you choose to run it yourself; ransomware encrypts your files — using the same kind of encryption the staying-safe-online topic described, but turned against you — and demands payment for the key; and spyware quietly hides and collects your passwords, messages, or banking details. What they share is a goal that is harmful to you and helpful to an attacker, and a need to get executed on your machine. That need is exactly why most infections start with a person being tricked rather than a computer being out-engineered: opening an email attachment that is really a program, downloading "free" software from an untrustworthy site, clicking a fake update, or plugging in an unknown USB drive. Once running, malware does whatever its instructions say — delete or scramble files, steal data, show ads, or quietly turn your machine into one more remotely controlled computer in a botnet used to attack others. The defenses follow directly from how malware spreads and are the same habits the staying-safe-online topic set out: keep your operating system and applications updated so known holes are patched, be skeptical about what you open, download, and run, and use antivirus software, which works mainly by recognizing known-bad programs and watching for suspicious behavior. The honest mental model is reassuring rather than frightening: a virus is a harmful program that still has to be run to do anything, so the single most effective protection is simply being careful about what you allow your computer to execute — the earlier topics already taught that the computer will run whatever instructions it is given, and avoiding malware is mostly about making sure those instructions were ones you actually chose to trust.

Malware = harmful software
a program written on purpose to do harm; a virus is one kind
Virus
attaches to a program, runs when you run it
Worm
spreads by itself across networks
Trojan
disguised as useful so you run it yourself
Ransomware / spyware
locks your files, or quietly steals data
All need to get executed on your machine
usually by tricking a person into running them
Defense: update, be skeptical, use antivirus
control what you let the computer run
Malware Is a Family; a Virus Is One Member they differ in how they spread and what they do Malware (harmful software) Virus attaches to a program; runs when you run it Worm spreads by itself across networks Trojan disguised as useful, so you run it yourself Ransomware locks your files, demands payment what they all share: a harmful goal, and a need to get executed which is why most infections start by tricking a person into running them
A Virus Still Has to Be Run to Do Anything so the best defense is controlling what you let the computer execute A harmful program sitting in a file — does nothing yet if run Now it does harm steal, scramble, spread block it here: do not run it The three habits that stop most infections 1. Update your OS and apps — known holes get patched 2. Be skeptical — about what you open, download, and run 3. Use antivirus — it recognizes known-bad programs and suspicious behavior

Take what is a computer virus further

Ask the copilot about this term, or have our engineers assess it against your process.