The people who are sending us those annoying pop-up advertisements are doing everything they can to make it hard for us to avoid their messages. Pop-Up windows now are more often of the Pop-Under variety, opening underneath the window we are working in, only to be discovered when we go to close out our work. As if that wasn't bad enough, they deliberately position the window so that you can't see the upper-right corner, where the "X" (cancel) button is found. Since we are so conditioned to closing windows that way these days, most people end up dragging the whole window to the left until the "X" is visible again, and then closing the window.
Here's an easier way -
In the original versions of windows, there used to be a button in the upper LEFT corner of every window. Clicking on it produced a drop-down menu that included a Close function. That button has fallen out of use these days, but it's still there. They may have removed the visible button, but you can still click on it. The next time one of those annoying advertisement windows shows up, point at the upper left corner, RIGHT-click, and select Close. It's much easier than having to drag the whole window to the left. Give it a try.