Can spyware protect a computer from a virus?

No Spware and viruses both damage the computer.

You need an anti spyware to remove spyware

and

a good anti virus to remove virus