Hi and Welcome. My Name is ***** ***** I look forward to assisting you today with your question.
That's a SCAM. DO NOT purchase anything or don't do anything that pop up or site says.
Press Command, Option and Esc keys and this will bring Force Quit window. Select Safari and click Force Quit. This will close Safari.
Then hold down Shift key on your keyboard and open Safari. Click on Safari menu and select Clear History and Website Data. On the drop down next to Clear, select All History and click Clear History. (If you see Reset Safari instead, click it and Reset Safari)
That will any traces of malware from Safari. Then go to this website --> https://www.malwarebytes.com/mac/
Download the Malwarebytes AntiMalware tool and run a scan with it. This will find and remove all malware/adware affected your Mac
If you have any questions or would like any additional information, please don't hesitate to ask.
Note : This is not my final answer. I strive to provide Excellent service or 5 star service. If you feel you've received anything less or if you are not satisfied or if my solutions didn't work, please don't rate me bad or poor or ok. Instead, please let me know and I will try my best to help you until you are fully satisfied or the issue is resolved.