Even though spyware comes from the family of malware, there are differences between the two. The term malware refers to any harmful software that can cause damage to a computer or network, like viruses, worms, trojan horses, and ransomware. In contrast, spyware is a specific type of malware that collects information about its victims without their knowledge. It can track keystrokes, take screenshots, and gather information about browsing habits and personal data.