The following solution is for Windows computers.
1. Access your Local Disk (C:) – also called Windows (C:). Look for the host file in the etc file in the drivers folder. C:\Windows\System32\drivers\etc
2. Open the host.txt, and at the very end, under the 127.0.0.1 localhost configuration, add: “127.0.0.1 www.websiteYouWantToBlock.xx”.
Additional websites can be added on a next line
3. Save changes
This process blocks the desired webpages from any browser.
To get rid of advertising pop-ups it is important to know that anti-pop ups are not good. Current web browsers now incorporate these tools. In addition, advertising on web pages is not only found in the form of pop-ups.
In Firefox, the Ad-Block extension allows you to block advertising. For more information, see here. This extension also exists for Google Chrome
Also you can use WOT, is a tool that can help you filter the sites that install this type of unwanted programs
There are a great majority of programs that free your pc from all the trash the internet, as well as browser extensions