A keystroke is a single press of a key on a keyboard. Each key press is a keystroke. Keystrokes are used for programming purposes to respond to the user pressing a particular key. However, they're also used for keystroke logging, where user keystrokes are tracked with or without the prior knowledge or consent of the user.
Examples of software programs that record keystrokes are typing tutor programs, that help teach users how to type more quickly and more accurately. Parental control programs can be set up to record keystrokes, allowing parents to see what their children are doing on the computer. Businesses and schools may also use software with keylogging enabled, to track what their employees or students are doing on the computer and verify no illegal or inappropriate activity.
The illustration above shows a log of over 2.5 million keystrokes from a Computer Hope keyboard. It also shows how frequently each key was pressed. The red keys are the most frequent keys and the blue keys are the least frequent. This image was generated using WhatPulse and is part of the WhatPulse Computer Hope team.