Adware is any software application in which advertising banners are displayed while the program is running. The authors of these applications include additional code that delivers the ads, which can be viewed through pop-up windows or through a bar that appears on a computer screen.
Spyware, similar to Trojan Horse, is a malicious program that users unwittingly install the product when they install something else. Once installed, the spyware can monitor the user on their Internet activities and transmit information, such as users'email addresses, passwords, and credit card numbers, to someone else in the background.
Adware and spyware can be loaded onto your computer any number of ways without your knowledge. Adware can get onto your computer via freeware or shareware - as a ligitimate way of helping recover programming development cost and hold down the cost for the user, or from a visit to an infected website. Free programs like weather programs, games, or file sharing programs that you download and install frequently contain spyware. Spyware can also be installed using Internet Explorer's ActiveX. Active X is Microsoft's equivalent to Sun's Java program and is sometimes required to view certain pages on the web. It allows web sites to install software on your computer without your knowledge or consent.
More information about adware and spyware on webopedia.com