A computer virus is a essentially a computer program also known as computer software that can copy itself and infect computers without permission or knowledge of the user.
The virus may modify itself while copying itself (infecting) or the copies may modify themselves, while infecting others, in a manner quite similar to a metamorphic virus (a biological virus that can change on its own).