You can use Ad-block Plus which is a Firefox add-on to help you block them. You can choose to block the site or block the code executing the pop-up. But if you are experiencing random popups, then something is not right.
Adblock Plus is only available for Firefox. I also recommend you using Firefox because it's much faster and secure. It also has a built in pop-up blocker able to block most pop-ups.