A keyl stroke ishacking program that runs in the background, recording all the keystrokes. Once keystrokes are logged, they are hidden in the machine for later retrieval, or shipped raw to the attacker. The attacker then peruses them carefully in the hopes of either finding passwords, or possibly other useful information that could be used to compromise the system or be used in a social engineering attack. For example, a keystroker will reveal the contents of all e-mail composed by the user. Keystroker is commonly included in rootkits.

There are other approaches to capturing info about what you are doing.

Some keyloggers capture screens, rather than keystrokes.

Other keyloggers will secretly turn on video or audio recorders, and transmit what they capture over your internet connection