Malware is transmitted when user downloads or installs an infected file, application or software. Or it can also get downloaded through spam/ malicious emails or links.