All of the below are classified as Malware
Malware is a term used to define any generic malicious software
A trojan virus is a program that appears safe when you look at it, but when you download and install it it turns out to be a vicious program that attacks your computer, often times installing a worm or spyware. These programs can cause significant damage to your computer. A good place to pick up these types of programs is either on file distribution programs such as Kazaa or "warez" and "cracks" sites distributing pirated software or the means to disable the built in protection capabilities.
A program or piece of code that is loaded onto your computer without your knowledge and runs against your wishes. Viruses can also replicate themselves. All computer viruses are manmade. A simple virus that can make a copy of itself over and over again is relatively easy to produce. Even such a simple virus is dangerous because it will quickly use all available memory and bring the system to a halt. An even more dangerous type of virus is one capable of transmitting itself across networks and bypassing security systems.
Since 1987, when a virus infected ARPANET, a large network used by the Defense Department and many universities, many antivirus programs have become available. These programs periodically check your computer system for the best-known types of viruses.
Some people distinguish between general viruses and worms. A worm is a special type of virus that can replicate itself and use memory, but cannot attach itself to other programs.
A worm is a little program either distributed through an email attachment or through a trojan. Once executed on your computer the worm makes several copies of itself before going through your email contact lists and sending itself to everyone on your list. You can imagine the damage that can be done with this type of infection. It is like spreading something by word of mouth. One person tells ten people. Each one of those people tells ten people and so on. Entire networks have been infected by this type of virus.
A rootkit's primary purpose is to hide files, registry entries, network connections or memory addresses from any special tools that Administrators or technicians use to monitor and detect authorized or unauthorized access to computer resources. Typical virus or malware removal software can not detect this threat, and thus remove the symptoms, without removing the source. Installing antivirus or antimalware software after the fact is ineffective, as it will only treat the symptoms, but not provide a cure.
Spyware comes in several different variants, but the consistent theme is that it tracks all your internet movements and reports them to the author, it spawns "popup" ads relevant to your movements or toolbars that you can not get rid of. Others hijack your start page or your web search. All of them choke the life out of both your computer and your internet connection, gradually bringing it to it's knees as the infection gets worse. This type of infection can come from visiting websites such as pornography, "warez" and "crack" websites, or downloading "free" software off the internet such as screensavers or Kazaa to name a couple of many.
Most often you are told in the license agreement that you are agreeing to install this malicious software by installing the program, but it is hard to find and nobody reads the licensing agreement anyways. Websites have code written that automatically installs these programs without you even knowing about it
A keylogger, sometimes called a keystroke logger, key logger, or system monitor, is a hardware device or small program that monitors each keystroke a user types on a specific computer's keyboard. As a hardware device, a keylogger is a small battery-sized plug that serves as a connector between the user's keyboard and computer. Because the device resembles an ordinary keyboard plug, it is relatively easy for someone who wants to monitor a user's behavior to physically hide such a device "in plain sight." (It also helps that most workstation keyboards plug into the back of the computer.) As the user types, the device collects each keystroke and saves it as text in its own miniature hard drive. At a later point in time, the person who installed the keylogger must return and physically remove the device in order to access the information the device has gathered.
A keylogger program does not require physical access to the user's computer. It can be downloaded on purpose by someone who wants to monitor activity on a particular computer or it can be downloaded unwittingly as spyware and executed as part of a rootkit or remote administration (RAT) Trojan horse. A keylogger program typically consists of two files that get installed in the same directory: a dynamic link library (DLL) file (which does all the recording) and an executable file (.EXE) that installs the DLL file and triggers it to work. The keylogger program records each keystroke the user types and uploads the information over the Internet periodically to whoever installed the program.
Although keylogger programs are promoted for benign purposes like allowing parents to monitor their children's whereabouts on the Internet, most privacy advocates agree that the potential for abuse is so great that legislation should be enacted to clearly make the unauthorized use of keyloggers a criminal offense.
An antivirus software alone will not defend against or remove all such threats, but a good antivirus & anti-malware/anti-spyware combination will do an adequate job. Malware coders are agressively seeking new exploits continuously, so such defenses require constant updates provided by well experienced and informed software authors.