A virus is defined as an infective agent. When that infective agent is in the body of a human it can be a lot different than if it is a virus that infects a computer this kind of virus is defined as a piece of code that is capable of copying itself and typically has a detrimental effect, such as corrupting the system or destroying data.
In other words, a virus is a program that is secretly installed onto your computer and makes copies of itself which will eventually consume your computer resources. Viruses can be easy to get and hard to get rid of sometimes. It is best to try to protect yourself from ever getting one in the first place.