Yes, malware, adware, scareware, and ransomware is out there in the wild attacking Macs. Most of it is not terribly dangerous but more annoying. Mac's are not immune to these threats but if you observe common sense safe practices it is unlikely to be a problem.
Exercising some caution in regards to phishing emails and text / social media messages as well as noticing those pop-up advertisements that attempt to convince you that you are infected and to install fake anti-malware tools, etc. goes a long way to protecting you. The rest is a matter of the following:
- Do not install software from anywhere except the Mac App Store or directly from a reputable vendors direct website. Most cleaners, maintenance tools, Anti-virus, and Anti-malware tools are not to be trusted and are mostly unnecessary. If they are legit tools, they do more to slow down your Mac than anything else.
- If an application states it wasn't signed by an Apple Developer nor Notarized (scanned for malware by Apple) think twice and maybe a third time before you install it. Make sure you fully trust the source of this application.
- Do not pirate software nor media of any kind (very common for malicious payloads to be included)
- Be wary of free games or download shareware sites that tend to include adware and another annoyances. Pay attention to text during the installation and uncheck necessary things like browser extensions, etc.
- Running any ad-blocker will go a long way to protecting you from rogue drive-by malware inside ad networks. I've had things download and attempt to run that originated from a rogue advertisement on a mainstream website.
- Avoid the seedy underbelly of the Internet (pr0n, hacking, illegal activity, etc.)
- Do enable the Firewall
- Disable any Sharing features in System Preferences you do not really need
- Do keep macOS and all your Applications up-to-date with security updates.
- Never Ever install a Configuration Profile unless it's your employer or schools IT department asking you to enroll BYOD (Bring Your Own Device) or it's a Mac owned by your employer or school. Never install any Configuration Profile that isn't signed with a valid certificate either. You will see a lot of red text and warnings. Do not ignore them.
[Edited by Moderator]