WannaCry is a type of ransomware that encrypts files on a computer or network, rendering them inaccessible until a ransom is paid. It exploits a vulnerability in Windows operating systems, spreading across networks to infect multiple devices.