A keylogger, also known as a keystroke logger, is a type of software or hardware that captures and records every keystroke made on a computer or mobile device. This can include sensitive information such as login credentials, credit card numbers, and other personal data.