A keylogger is a specific type of spyware. It is designed to capture keystrokes on a computer device and then transmit that information to a cracker who will then attempt to use that information to commit a cybercrime.
Keylogger software must be placed on the client computer. This can be done in a number of ways, for example, a Trojan Virus could have spyware as its payload.
The data collected by the keylogger software must be collected by the cracker for it to be of any use. For this to happen, the keylogger will usually upload its data over the internet to the cracker.
This is one of the reasons it is recommended that you do NOT use public computers (at an Internet Cafe for example) to perform sensitive tasks such as Internet Banking.