I assume you have adware. Follow the instructions on this web page in order to manually remove adware from your mac: https://support.apple.com/en-us/HT203987
You may also find adware removal guide on this page http://www.thesafemac.com/arg-identification/
If you do not want to remove adware manually use this anti malware tool in order to scan and remove it: https://www.malwarebytes.org/antimalware/mac/?utm_source=blog&utm_medium=social