Both are generally installed on a computer without the user's knowledge or consent, usually included with a free download or an attachment. They have undesirable side effects.
They also invade your Internet history, but they might invade your personal data. The malware versions of spyware and adware generally meld the two.
Because of their similarity in function though not results, spyware might be called a form of adware, or adware might be called a form of spyware. They are also often interlinked, which further blurs the line between them.