depends on your internet browser. some have a built in pop-up blocker and you will need to find the correct setting.
I use safari which has a Pop-up blocker found under the privacy settings of the preference menu. I also use a third party "ad-blocker" which stops lots of annoying adverts appearing on some websites.