Cybersecurity

Virus

Definition

A computer virus is a type of malicious code or program written to alter the way a computer operates and that is designed to spread from one computer to another and has the ability to replicate itself.

Why It Matters

Viruses were one of the earliest forms of malware. They spread by attaching themselves to legitimate programs or documents, and when the host file is executed, the virus is activated.

Contextual Example

A user downloads an infected file from the internet. When they run the file, the virus code executes, copies itself to other programs on the computer, and may begin to delete files or cause other damage.

Common Misunderstandings

  • A virus requires human action (like running an infected program) to spread.
  • This is different from a "worm," which can spread by itself across a network without human help.

Related Terms

Last Updated: December 18, 2025