Some people get infected, some don't, and it does depend to some extent the type of sites you visit--it isn't just the porn sites that can infect you. Computers used by kids are especially vulnerable.
I've mentioned before what I've used to get rid of spyware. How do you prevent it in the first place?
On a Windows computer it is difficult. Things that can help:
- Set up one account as administrator, with a decent password and only use it to maintain the computer. Set up a User account with few priveleges, use that most of the time.
- Keep Windows up to date--I'd leave Windows Update running.
- Use a router, even if you don't have more than one computer. Make sure you change the password on the router. Set up security on the wireless, or better yet turn it off if you aren't using it.
- Use a software firewall. These can be annoying for a day or two--they will typically ask "Some program wants to connect to the internet, should I let it?" If it makes sense, let it, if not, don't. In a few days it will know which programs are OK and it will rarely bother you.
- Don't use Internet Explorer, especially for questionable sites. Instead use Firefox or Opera.
- Make sure your antivirus is up to date. If it came with the computer and the system is more than a year old, you will probably have to pay for updates. There are several good free antivirus programs--They typically work better than the paid subscription ones. AVG, and Avast are two I am familiar with-I use AVG on my wife's Windows box-It updates automatically, and doesn't suck up system resources.
- If you are on the internet, and get a dialog box that says anything about installing a program, scanning your system, infection, or similar, close it with the X in the upper right corner--Do not use the buttons inside the box--Even clicking "no" can give the box permission to install who-knows-what on your system. If the dialog box can't be dismissed with the X, close down the browser. If That doesn't work, re-start the system.
- Be suspicious if a link to a video wants you to download a new codec to watch it--These are often scams to install nasty crap on your system. Be especially suspicious if the video says it is of a current hot female star doing something naked or kinky.
A tiny bit of Linux history: ATT invented Unix. Many colleges taught it, and many companies made their own versions. Tannenbaum invented Minux, a version of Unix for early (pre-Windows) personal computers, primarily as a teaching tool. Linus Torvolds used Minix to write his own version, eventually replacing all Minux code. He posted this to the internet with an open source license. The operator of the site called it Linux as a joke. The name stuck. Torvolds got lots of help in improving Linux, until it became as powerful and stable as Unix. Major corporations became interested, and added their own improvements, Various groups made "distributions" combining the Linux core with all the other programs needed for a working system. Linux was hugely popular for internet servers. Mark Shuttleworth, a dot-com millionaire founded Ubuntu, and sponsored a lot of effort in useability. Ubuntu quickly became the most popular desktop version of Linux.