Two very basic precautions can help keep your computer virus free - install and use software from reliable anti-virus vendors and avoid opening unknow e-mail attachments.
E-mail attachments are potential virus carriers. Some of the most famous viruses were distributed by accessing address books of infected computers and sending e-mail (with attachments) to everyone in the address book.
Even email received from known senders should be regarded with suspicion - e-mail addresses can easily be faked to appear to be from someone you know.
The 'Melissa' virus that appeared in 1999, originally posted on an Internet newsgroup, was distributed in a Microsoft Word document. When downloaded and opened the virus accessed the user's address book and sent copies of the document (along with the virus) to the first 50 people in the user's address book.
Every computer that received the virus sent out an additional 50 copies, creating a worldwide slowdown of the Internet network. The effect took only a few hours to be felt worldwide.
Another widespread virus distributed by e-mail was the 'ILOVEYOU' virus of 2000. When double clicked it sent copies of itself to every e-mail address in the infected computers address book. Far from a problem of the past, viruses are still very much with us.
What can you do to help eradicate viruses?
Antivirus Software
Antivirus software is available in both commercial and freeware versions with a variety of features and prices, usually from free to less than $50.
Normally antivirus software works by examining files as they arrive at the computer and by scanning later at configurable pre-set times. The programs work by examining each e-mail attachment and downloaded file looking for virus 'signatures'.
If a virus is found the user will be alerted and infected programs and attachments can be cleansed of the virus or, if not possible, infected files can be deleted or placed into 'quarantine' where they can not be run.
Update Your Anti-Virus Signatures
Whare are anti-virus signatures? All programs have instructions in a pattern. Computer viruses - like their biological counterparts - come in known, though evolving, patterns. The fact of evolution is the reason virus-checking files need to be regularly updated. Updated files contain lists and the characteristics of new signatures.
Most antivirus software can be configured to alert you when the virus checking files are out of date, and even to automatically download (from the vendor's authorized site!) signature files with the latest anti-virus signatures version.
Users often become complacent after installing antivirus software. They think they are fully protected and do not need to worry about becoming infected.
Apart from the fact that antivirus software is written by humans, who can make errors, vendors can only react to viruses after they're created. By that time much damage can already have been accompished. An e-mail attachment or program may be infected with a new type of virus that your software cannot (yet) detect.
Some antivirus software can - to a limited extent - detect virus activity even without being able to identify a particular virus (holistic anti-virus detection). This is an extra level of protection against the latest viruses, but still shouldn't allow users to become overconfident.
Always use trusted sources for downloading software and treat every e-mail attachment with caution.
Other Infection Routes
Lastly, a special note about removable media (e.g. CDs and DVDs). While they can't be written to (with the exception of those that are called CD-R's, DVD-R/W or some variation), they can still contain viruses. Users who burn their own CDs or DVDs - inexpensive and easy these days - can accidentally copy infected programs onto the disc. Since CDs can contain files that automatically initialized when the disc is inserted, it's possible - though rare - for viruses to be spread without additional user action.
Once again, the lesson is clear. Only accept material from those you know and trust, and who practice 'safe file sharing'.