Most of the time these pop-up messages also carry malicious spyware or viruses so I suggest you put an add-on in your browser that serves to block pop-up ads and messages. You might also want to double check your anti-virus if it has a blocker or something.
Some advertisements are tricky but never ever try to click any of them! Some may lead you to a dangerous page. Other times, they are just Google Ads lol, they're for the sake of earning money I know, but it's really annoying.