My name is***** am sorry to hear that you are having this issue.
I will be glad to assist you with this.
That sounds like an adware scam. Dont worry about the contents of the hard drive, it will not be affected. it is only connected to the safari web browser.
Follow these steps please.
press and hold the power button until the Mac powers off. Then power back on normally while holding the shift key down. This will start up the Mac in safe mode.
Then clear the safari browser web cache.
Did that work for you?