Spyware is a classification of software which is designed to collect information about computer users, often without their knowledge or consent. In general, it is classified as malware although pure spyware does not try to damage the host system. It is generally installed along with a legitimate program as "bloatware." The kind of information collected varies, but in general, it is all collected without the user's knowledge.
The first recorded use of the term spyware was in October 1995, when someone on Usenet used it in reference to Microsoft's business model. However, the term was popularized by Steve Gibson of Gibson Research in 1999. He used it in reference to its now best-known meaning--software which steals user information. He then produced the first software to counter this kind of threat, which he called "OptOut." Lavasoft (now adaware) continued development in this area, becoming the first popular commercial defensive counter to spyware.
The most common kind of spyware is that which collects online shopping information for marketing purposes. This kind is often installed as a browser addon. It records what the user has looked at and bought, reports back to its developer, and retrieves advertisements they believe with be of interest to the user. The more dangerous form of spyware is that which records and reports all useful activity. This can easily include the user's full name, address, phone number(s), credit/debit card numbers, and even social security numbers, for those in the United States. Such information is sometimes then used to steal that user's identity.
Obviously, the average user does not want spyware on their computer. To avoid it, they should first and foremost install reputable anti-virus and anti-malware programs. Some such software is available for free, although the paid options will usually offer more options and/or protection. Some popular anti-virus programs are: AVG (Free & Paid), Avira (Free & Paid), Avast (Free & Paid), ESET (Paid), BitDefender (Paid), Kaspersky (Paid), and Amiti (Free). Anti-virus software is important, but is not always designed to catch all spyware. For this reason, anti-malware software is also helpful to many users. There are also free and paid options in this category. Some of the popular options are: Spybot Search & Destroy (Free & Paid), Malwarebytes (Paid), SUPERAntiSpyware (Free & Paid), Lavasoft's Ad-Aware, and Zemana AntiLogger (Free & Paid).