Spyware is malicious software that secretly gathers information about a user's online activities without their knowledge or consent. It can track keystrokes, capture passwords, and transmit sensitive data to third parties.