Antivirus software uses various methods like signatures, heuristics, and real-time protection to identify malware like viruses, worms, and trojans. It works by scanning files and comparing them to known virus signatures. While antivirus software is useful for protecting devices from malware, it also has limitations like unexpected renewal costs, potential false positives, and reduced effectiveness against new viruses. Antivirus software must also contend with techniques used by malware authors to avoid detection, such as rootkits that have full system access.