Hi, welcome to justanswer.com! My name is Mike.I am going over your question and I will be with you shortly.
Go here and download Malwarebytes Anti-Malware for Mac, open it and select Scan:
It will scan for malware and then give you the option to remove it. Then restart and run it again until you get no malware detected.
If you can't use Safari go to the Apple Logo to Force quit and choose Safari then hold Shift and Reopen Safari.
Did you try that?