You can use 'force quit' from the drop-down menu beneath the Apple
and choose Safari (or other applications, for different reasons) so it
will quit. Then on re-start of Safari, hold the Shift key down so browser
won't start from any saved previous web pages.
{The browser will remember and reload the same page, unless you choose
to interrupt the reload; this is a software method in the Mac. Another means
would be to deny access to internet; shut off AirPort (at antenna icon near
Date and Time in upper right window) or if wired internet, unplug Ethernet.}
Without being set on start page, you should be able to go into Safari preferences
and remove the browser history including cookies; check the homepage setting
to see that it didn't set that up, too. This is part of an Adware situation that may
be serious, especially should you over or under react to the presence of evidence.
After changing Preferences in Safari so the bad page(s) don't load, a restart of
Safari would be OK. My browsers don't load anything at all when I launch one.
www.chriswrites.com/open-safari-without-restoring-tabs-and-windows-quick-tip/"When you want to open Safari without restoring tabs just hold down the shift key
when launching the app from the dock. This also works with the other Apple ..."
Safe + free products such as the new 'Adware Medic' from malwarebytes for mac
can find & remove adware; http://www.adwaremedic.com/ ~ Another safe + free
product can generate a report to see items that may be affecting the macOS X, the
report can be posted to an Apple discussion so others who view it may help. This
other product is Etrecheck. Read to see how it works, what it does, + get it here:
• About Etrecheck: http://etrecheck.com/#about
Other kinds of pop-up windows may say your Mac has ransomware inside, then
it may suggest you call a toll-free number; then they have you. It is a fake scam
until you add the missing ingredient they're looking for. A few good articles are
available to read, and direct ones attention, so you are aware should that happen:
Phony "tech support" / "ransomware" popups and web pages
In any event...
Good luck & happy computing!