Last week a friend struggled to recover from a virus infected PC. He tried to get it removed using several anti-virus programs (some he went out and bought, some were free ones). After a week he thinks he may be okay now, he has his fingers crossed. After early attempts were unsuccessful I suggested that he bite the bullet and reformat his hard disk and then re-install Windows since that would fix everything. He never responded to that suggestion and continued trying to clean his PC. Finally, I found out that he had nothing backed up so if he did as I suggested he would lose all of his data, family photos, bookmarks, etc.
To help out other people I thought I would pass along this list of things I do because it might help you out too. This is not an exhaustive list, but if you carefully follow it then you will greatly reduce your chances of having the big problems my friend has been having. Oh, and I am using the word virus to cover all the bad stuff of various types.
Having a PC connected to the internet, particularly a Windows PC, is a constant struggle to keep it clean. In addition to all I do, which has kept me virus free since my first home PC in 1998, I back up everything several times a week. Currently, I have 2 external hard disks and they have identical stuff on both. Data, photos, bookmarks, etc.
1. Backup your data often!
2. Vista is more even secure than Windows XP. I have been using Vista for about 2 years.
3. With Vista or WinXP make sure you do all your normal PC usage with a user account and not an admin account. A user account has fewer privileges so bad software is much less likely to be able to do serious damage. Only use the admin account on rare occasions to set something up.
4. Make sure you keep Windows up to date with all the security fixes. New ones come out almost everyday. Set Windows to automatically check for them and download.
5. Consider not using Internet Explorer. It is relatively unsecure and lots of people get viruses that come through security holes. In fact, Microsoft had a big security alert just a few weeks ago about some major problem and everyone should have immediately stopped using IE until the bug fix was released. I think the release came out a few days later. I have been using Firefox for the last few years. It is more secure or, at least, fewer virus writers are targeting it since not as many people use it. I also like using it a lot more than IE.
6. Of course, use good anti-virus software and update the definitions daily. Also, run a full virus scan often, even everyday.
7. Anti-spyware and anti-adware software are important too.
8. A firewall is important too.
9. I only use webmail (gmail, yahoo, etc.) because they do automatic virus scans on everything and also because they don't actually download stuff to your computer unless you specifically ask them to do it. I have used only them for the last 8 years.
10. Be very careful about what you actually download to your PC.
Of course, you can do all of this and still get a virus, but I have been careful and never have. Knock on wood.
Ultimately, the best protection is not to have your computer connected to the internet -- ever. Take it out of the box make sure no internet connections (wire or wireless) are possible and then use it until it dies or you buy a new one. Oh, and never insert a CD, floppy disk, USB flash drive, etc. that can bring something from the outside into your computer. These days though, except for a few special purposes, the PC wouldn't be of much use to most people though. :-)
The Mac gets fewer viruses, but that is not necessarily because it is more secure, but because it is targeted less since it is less common than Windows.
Linux gets fewer viruses, but that is not necessarily because it is more secure, but because it is targeted less since it is less common than Windows.
Oh, and cell phones can get them too. Yep, the iPhone too.
Also, you can even get bad stuff from putting a CD you bought at the store. check out the Sony CD rootkit fiasco.