Antivirus is a program made for detecting and deterring malware.
Antivirus can be complex
Antivirus softwares today use a combination of techniques below, not to mention that many also have proprietary / sophisticated methods for detecting malware.