macOS features an embedded antivirus solution called XProtect that detects malware using signatures and blocks its installation. This technology aims to prevent infection, but if it happens, another built-in program called Malware Removal Tool (MRT) is supposed to monitor potential malware activity and remediate infections.
In addition, a built-in firewall can provide network protection. Finally, automatic security updates improve the overall level of system security.