Antivirus software uses various methods to detect and remove malicious computer programs like viruses, worms, and trojans. Signature-based detection searches files for known malicious patterns, but cannot find new threats. Heuristics use generic signatures and behavior analysis to identify variants of known malware. As viruses evolve over time through mutations and refinements, antivirus software must be frequently updated to recognize new strains.