Apple does not send messages like that...
That is evidence of the scam. Don't call it.
That message and phone number is not Apple.
If you have reason to, you could
Contact Apple from their web site:
http://www.apple.com/support/contact/
Note next link covers phony tech support scam & how around issue:
Phony "tech support" / "ransomware" popups and web pages
And the OS X does not warn of what does not affect it.
• Stop pop-up ads and adware in Safari - Apple Support
The phony tech support scam is an enticement to get people
to call and tell them yes, unlock my mac and steal my ID and
also while in there, take my AppleID, brick my mac, and toy
with my accounts and personal information, too. Don't do it.
• U.S. iPod, Mac and iPad technical support:
(800) APL–CARE (800–275–2273)
http://www.apple.com/contact/
{The scammers also like to get you to pay, too, to allow them
inside your Mac to mess you up & rob you further. Avoid it.}
Good luck! 🙂