To block ads and pop-ups on websites, you can use browser extensions like AdBlock Plus, uBlock Origin, or AdGuard. These tools effectively block most ads and pop-ups.
To block ads on YouTube, you can also use the aforementioned extensions. They handle most ads, although occasionally an ad may appear that they can't block.
If you have any more questions, feel free to ask!