An antivirus program protects computers from viruses by identifying and removing any computer viruses found in files or programs. Antivirus programs work by scanning files, email attachments, and removable media for malicious programs that try to modify the operating system or other programs. They use virus signatures or definitions to identify known virus codes. It is important to regularly update the antivirus program to download any new virus definitions. While no method can guarantee complete safety, installing and using an updated antivirus program is an effective way to safeguard computers and networks from virus threats.