There is a legitimate use for spyware in browsing where you may agree to allow a business to track you, for example through cookies, key search terms, or keyword searches in emails. In return you receive something of value such as more relevant advertising results, free email services, or a better browsing experience.
Spyware programs can run silently without your knowledge on your machine or device, or through your browser. They allow attackers to watch what you are doing on your machine as well as steal information, including passwords, and may use keyloggers that record what you type on your keyboard.
Attackers using spyware can do things like:
change the configuration of your browser and machines that may make them slow or pop up unwanted ads or ransom demands.