Often people confuse two terms "Malware" and "Viruses" thinking they mean the same thing which in fact is not true.
Malware encompasses a large number of different kinds of destructive and harmful computer codes and viruses being just one of those kinds. In fact malware include trojan horses, keyloggers, adware, rootkits, worms, etc.
According to a research done by PRR Computers viruses make 57% from all other kinds of malware.