Open Mozilla Firefox window and open Menu in the top right corner of the window
Select Options from the Menu.
In the Options, select Privacy and Security on the left side.
In Privacy and Security, go to Permissions.
There is a Block Popup windows option in Permissions.
Check/Select the Block popup windows so that all the popups on the browser will be blocked.
You can make exceptions for some websites by clicking the Exceptions button.
You can add websites so that popups will be allowed for those particular websites. Once added click Save Changes button.