I would recommend installing an adblock extension for your browser, I personally use and recommend uBlock Origin but you can also choose from AdBlock Plus and others. There are versions for Chrome and Firefox, as well as Microsoft Edge. Keep in mind this will only block ads in your browser and not in any executables you run on your computer but this is still good enough for most people. Best part is that this extension works on any site that has ads (however some sites can detect that you're using an adblocker and refuse to load the rest of the website until you disable it, I do not believe Facebook is one of those sites though, it's mostly news sites. And there is still ways to circumvent this as well). I've been using uBlock Origin and haven't had a single ad or pop-up on Facebook.
If you want to be more technical and block ads for all devices on your network you can use an adblocking DNS server on your router (not recommended unless you really know what you're doing) or setup an adblocking DNS for each device in that specific device's DNS settings. I will not be posting a tutorial on how to do either of those here since not all routers are the same and each router has different ways to change the DNS servers, and some routers don't let you change the DNS servers at all.. This also applies to all the different OS'es (Windows/macOS/Linux distros/Android/iOS/etc) However, a quick and simple Google (or DuckDuckGo) search will give you a how-to guide you can follow.