Some are "adware" and do that. Also there are rogue distributions of Firefox that are build with add on advertising.
There's also FlashBlock and Adblock+ for Firefox if it's not adware.
Bob
I have os x 10.7.5 on a macbook and firefox 37.0.1. Can you pls tell me how to block all the ad videos constantly popping up on my screen? Some of them have a little window asking me to allow or deny Adobe Flash Player Settings but when I hit deny nothing happens.
The ad continues to play and the Adobe window won't disappear.
This is unbelievably annoying and there must be a way to block this stuff.
thanks for your help,

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic