A computer virus is a self-replicating computer program written to alter the way a computer operates, without the permission or knowledge of the user.
Though the term is commonly used to refer to a range of malware, a true virus must replicate itself, and must execute itself.
The latter criteria are often met by a virus which replaces existing executable files with a virus-infected copy.
While viruses can be intentionally destructive—destroying data, for example—some viruses are benign or merely annoying.
For more information about the topic Computer virus, read the full article at Wikipedia.org.