It is all Google's fault. I think you can stop it somehow. I shall have a look online and find out how.
Right, if you are using Firefox (as I do), then in the Tools menu, choosing "options" gives you a chance under the "privacy" tab to tick "tell websites I do not wish to be tracked" and on the same tab you can delete your cookies, which are probably causing a lot of the unwanted ads.
On the "content" tab you can block pop-up windows, too. If there are no pop-up windows, no-one can pop an advert up.
There is also a "start private browsing " option on the "tools" menu, but I have not used that so am not sure how it works.
In Internet Explorer the "options"menu has similar choices, which I am not familiar with, but they probably do much the same things.