A virus is a program which can self-replicate and insert itself into other applications on your computer. They vary in the amount of damage they can do, from simply slowing your computer down so much it becomes almost unusable to the worst scenario, which is destroying data, disabling software and deleting files.
Spam is unsolicited or junk email that clogs up your email inbox. The best way to deal with spam is not to open it or reply to it. Use your spam filter and if you are using a email site such as Gmail, be sure to report the spam, as every piece reported is added to a database. Be aware of which websites you enter your email address on, make sure the site states they will not sell your details onto a third party. When you sign up to some legitimate sites they will try to opt you in to as many advertising emails as possible, simply un-tick all the opt-in boxes.
Spyware is software which gathers information about you and transmits it to an unauthorised third party. This can cover everything from what sites you go to on the web to logging your keystrokes and finding out passwords and PINs.