Antivirus programs protect devices from malware by using methods like signature detection, real-time scanning, behavior analysis, and heuristic analysis to identify and remove threats. They require regular updates and user vigilance for maximum effectiveness, along with employing features like firewalls and quarantine systems. Although they are essential for cybersecurity, users must adopt safe online practices and understand the limitations of antivirus software.