A virus in a computer is a piece of code that is capable of copying itself and damaging software.
A can be a damaging thing that can corrupt the system, or destroy data.
Basically a virus is a piece of code that is capable of copying itself, it can also be a program, which is loaded onto a computer typically with the purpose of causing harm to the system.
All computer viruses are man-made and can be relatively simple in their construct, but even a simple virus is capable of copying itself and using up system memory which will bring the computer to a halt.