Malware is the umbrella term for all malicious software; a virus is just one specific type of malware — one that attaches to a legitimate file and spreads by infecting other files or systems.
Every virus is malware, but not every piece of malware is a virus — the same way every square is a rectangle, but not every rectangle is a square.
In everyday conversation people often say "virus" to mean any kind of infection, but from a security standpoint the specific type matters — it determines how the threat spreads and how you remove it.
Last reviewed: September 2026