There are different ways antivirus software works, and most use a combination of multiple methods. These can be signature-based detections, heuristic analysis, behavior-based detection, or sandboxing. If malware is detected, most antivirus programs can quarantine the offending file or automatically remove it from your system.