Beth is right about being diligent in what sites you visit.
My virus protection flashes a warning whenever I visit sites that can be dangerous. Then it's up to me to go forward. I also get warned whenever sights try adding tracking cookies or try to get any info. Those get automatically blocked.