How do anti-virus programs work?

Anti-virus programs typically employ two methods to detect and eradicate their digital nemesis: the computer virus. The first is to check known virus signatures against a database, engineering a fix that directly matches the bug.

Most anti-viral software relies on this method, drawing on the internet for its effectiveness by constantly updating the ‘wild list’ of known viruses, which allows ‘patches’ to be developed and downloaded into your AV database to keep it up to date.
The second method is simply to think like the virus coders, looking out for weaknesses in existing programs and then staking them out. Working closely with software manufacturers, anti-virus software can detect when a known program is behaving strangely, alerting everyone to a potential threat before developing and delivering the antidote.