Then there are the legitimate programs that have been infected with subprograms called viruses . Viruses are crafty things that are cleverly (if perversely) designed to replicate themselves whenever their host program is run.
Viruses can also be used to compromise the machine their host program is running on.