These definitions are not mutually exclusive, as specific attacks can be a combination of these three types. Viruses A virus is a computer program that copies itself from file to file and typically performs malicious or nuisance attacks on the infected computer.
Computer viruses are analogous to biological viruses.
A computer virus is a program that copies its code into one or more larger host programs when it is activated. When the infected programs are run, the viral code is executed and the virus replicates. The vast majority of computer viruses also carry a payload. This is the damage that they will do to computers after a designated period of time, and can range from displaying annoying on-screen messages to deleting files or erasing hard disks. Worms A worm spreads from computer to computer.