Anti-virus software detects and removes viruses and malware through four main techniques: memory resident monitoring, heuristic detection, virus signature detection, and checksums. Memory resident monitoring involves software that constantly monitors the system while running. Heuristic detection looks for suspicious program behavior. Virus signature detection compares programs to a database of known viruses. Checksums calculate a number based on a program's data to detect any changes from the original file.