Ransomware is a type of malware that encrypts a victim's computer files and demands payment to decrypt them. The first known ransomware attack occurred in 1989 targeting the healthcare industry and was called the AIDS Trojan. Ransomware attacks work by encrypting a victim's files and demanding payment, typically in cryptocurrency, to regain access to their files.