Spyware and adware differ in their usage. Spyware covertly gathers user data and sends it to a third party; adware gives the user unwanted data (advertisements) and seeks to entice the user to buy from a third party.
Spyware is often malware (software that harms your computer) and can even be used by hackers to remote control your computer; adware is not necessarily malware and often is not—the advertisers know that you are not likely to buy a product if the adware advertising the product harms your computer.
Companies are legally permitted to use adware with the user's consent, but a company that uses spyware will find itself under pressure to remove it.