It is a form of SpyWare used for different purposes.
A keylogger is a tool that keeps track of the keystrokes pressed by the enduser on their system. This could be used by attacker to maliciously gain access to user's passwords anf other private information.