A computer virus is a piece of program code that, like a biological virus, makes copies of itself by attaching itself to another program. The virus can waste the host's resources, and sometimes destroy or change files.
While viruses are usually malicious - destroying data or crashing network services - many do nothing or are just annoying (for example, displaying a message to the user). Many viruses are made to wait a long time before doing anything, usually destroying data on a certain day, like a holiday.
Viruses are usually spread by a computer network, by e-mail, or by removable media such as a thumb drive.