Spyware infects your computer by downloading itself while you surf the internet and visit infected websites.
Other spyware applications gain access when you authorize certain free programs to be downloaded.