Both are types of malicious software. Usually, a virus contains a contagious piece of code that infects other apps to spread between computers and damage files.
Adware has a different goal: it renders ads to generate revenue, spy over the user, and target them with relevant ads. Not all adware has malicious intent, but it becomes a problem anyway as it harms your Mac’s performance and can be annoying. That’s why it’s a good idea to use an adware scanner that automatically neutralizes adware infection before it does any harm.