Apple has a great reputation for keeping their devices free from the scourge of malware attacks and viruses. The company has a strict software policy and actually prevents the download of dangerous software in many instances via a feature named Gatekeeper.
Gatekeeper won't actually let you open an application from a developer that it hasn’t already approved - you'll know when it does as the message "X program can't be opened because it is from an unidentified developer.", it's somewhat limiting but gets the job done, most of the time.
I say most of the time because those nasty Malware creators now make software that impersonates approved software packages, it's important to point out you'd likely have to download the bad software from a dodgy place, like a pirate software torrent site in order to get this but it is possible.
To combat this there's an anti-phishing technology built into the Safari browser that will identify websites, showing an alert warning you if you visit a website that's on the suspect list.
To further protect your Mac, Apple has a malware scanning tool named Xprotect which is built into the operating system and this checks software against a list of known malicious programs, it works in the background and doesn't need any setup on your end, it's just there. You can install additional Antivirus software like Norton Antivirus on your Mac, iMac, iPad & iPhone and the two will work simultaneously, for additional protection.
Both Norton and Apple have their own security teams, and each reacts to automatic reports they receive from other users, as in if you do manage to get into a bad spot, the information is used by the respective company to first flag the malware on the list, then to come up with a way to remove it. The more people that band together using the software and sharing the information the safer everyone becomes - of course, that brave first someone, somewhere, needed to get into the bad situation for the issue to be noted...
Every now and then a BIG BUG like recent High Sierra root bug, Spectre or Meltdown make the news. These flaws allow access to the core settings within a system, allowing administrator like access to turn off security measures in some cases, stripping back all those protective layers and allowing Malware to set itself up and infect your system. It's new threats like these that you really have to watch out for, and addressing them is best done by ensuring your operating is up-to-date and only download software from official locations, like the Apple APP Store.
In addition to that sound advice, doing the following in these troubling times is a good idea too.
- Try not to connect to public Wi-Fi networks - consider tethering to your Smartphone or getting a device like the Alcatel Pocket WiFi, another option is to use special software like Norton WiFi Privacy
- Be wary when opening emails - If you do get an email from a somewhere you trust, like your bank, don't just follow the link and enter your login details. Instead, open your browser, visit the official website and complete your business that way.
- Apple blocks Java and Flash by default - If you do choose to use these be sure you keep both up to date via the official websites as they are known to open up additional vulnerabilities.