In the menu bar at the to left of the screen, click on Safari.
Choose Block Pop-up Windows.

Quit from Safari, menu bar, Safari, Quit Safari.

This is different from clicking on the little red button at the top left of the Safari window. (But you don't quit Safari like that, do you?)

Relaunch and you should be fine.

P