Install and run both of these anti-malware apps. DO NOT pay for the premium version - if you are a fairly informed internet user who knows enough to to go clicking willy-nilly on those scary ads or pages that claim you're infected, you'll be alright. Just open and run a scan whenever you think you have a problem.
Malwarebytes for Mac
and
DetectXswift