Alternatively referred to as a keystroke logger, a keylogger is a software program or hardware device that is used to monitor and log each of the keys a user types into a computer keyboard. The user who installed the program or hardware device can then view all keys typed in by any computer user. Because these programs and hardware devices monitor the keys typed in, a user can find user passwords and other information a user may not want others to know. The picture is an example of what a hardware PS/2 and USB keyboard keylogger. These keyloggers attach between the keyboard and the computer.
A hardware keylogger can be connected to the back of a computer, often without a user knowing about them, and then be disconnected to collect all logged information.
If you're concerned about privacy or have sensitive data consider anti-keylogger protection software that is designed to prevent and stop hardware and software keyloggers.