Avoid Dangerous Neighborhoods: Just like in the real world, if you go looking for trouble in cyberspace, you are bound to find it. Don’t visit questionable sites like those with pirated software (warez sites), hacker sites, or sites that promise you software keys and other ways to break the law.
Don’t Follow the Crowd: Almost all viruses use flaws or features of Microsoft products. Using alternative software, especially Web browsers and email programs will thwart most viruses. Mozilla is good choice for both Web browser and email client. Using a non-Microsoft operating system such as Linux can also be a good choice for some. These measures won't prevent all viruses but they will greatly improve your chances of not becoming infected with the most prevalent viruses.
Even with the safeguards above, it is still a good idea for most people to use good anti-virus software. Believe it or not you can get top of the line antivirus software free for personal use. Check out these best free antivirus recommendations to get your free antivirus protection.