In a ransomware attack, your device is infected with malware that allows the attacker to encrypt your data. This leaves you unable to access the data. The attackers then request a ransom in exchange for a decryption key that would allow you to regain access to your data.