A computer virus is a type of malware that attaches to another program (like a document), which can replicate and spread after a person first runs it on their system. For instance, you could receive an email with a malicious attachment, open the file unknowingly, and then the computer virus runs on your computer. Viruses are harmful and can destroy data, slow down system resources, and log keystrokes.
Cybercriminals aren't creating new viruses all the time, instead they focus their efforts on more sophisticated and lucrative threats. When people talk about "getting a virus" on their computer, they usually mean some form of malware - it could be a virus, computer worm, Trojan, ransomware or some other other harmful thing. Viruses and malware continue to evolve, and often cybercriminals use the type that gives them the best return at that particular time.
The term "virus" and "malware" are often used interchangeably, but they're not the same thing. While a computer is a type of malware, not all malware are computer viruses.
The easiest way to differentiate computer viruses from other forms of malware is to think about viruses in biological terms. Take the flu virus, for example. The flu requires some kind of interaction between two people - like a hand shake, a kiss, or touching something an infected person touched. Once the flu virus gets inside a person's system it attaches to healthy human cells, using those cells to create more viral cells.