Malware and Viruses on Mac In most of the places, the Mac computers are protected against the malware and viruses, but not all of them. This means that even Mac computers may be infected with these dangerous things.

How can we understand that mac computer is infected with a malware or virus ? This is very easy for the computer with windows operating system because antivirus programs detect all dangerous things in the computer. On the other hand, anybody do not advise me to install a Mac protecter program because most of them are malware itself.
It's generally upto you to keep a watch for any suspicious activity on your Mac to detect presence of a malware or virus. If you are tech savvy and follow news around Apple, you should be able to hear about any newly discovered threat. Apple software engineering team is quite prompt and quickly releases patches fixing any newly uncovered serious iOS and macOS threats.

It is highly recommended to always keep your OS up to date.