There is an interesting study by a Danish security firm that found the main reason people get viruses is because they don’t update their software.
The main reasons for getting infected are through old versions of Adobe Flash, Adobe PDF Reader, Java and Microsoft Internet Explorer. So if you use these, make sure you keep them up to date!
The conclusion of this study is that as much as 99.8 % of all virus/malware infections are caused by exploit kits and are a direct result of the lack of updating these five specific software packages.
As I always say, prevention is better than a cure, and as annoying as it is, it’s safer to keep your software up to date (and less annoying than getting a virus).
Microsoft recently published a similar study where they found about 90% of virus infections were through unpatched software.