Keylogging refers to the act of recording or monitoring keystrokes on a computer or device without the user's knowledge or consent. It is often used as a malicious technique to capture sensitive information such as passwords, credit card numbers, or personal messages.