I have no idea how to turn JavaScript off on my phone I didn’t even know that was on the phones.
Despite the similar names, Java and JavaScript have nothing to do with each other. You cannot in any way install Java, Flash, or Shockwave on an iOS device.
JavaScript controls many web actions. For example, every time you roll your mouse over something on a web page and it changes to something else, that's a JavaScript rollover in action. That's just one of many things JavaScript is used for.
In Settings, you would turn it off by scrolling down to Safari, select that, then Advanced and tap the slider for JavaScript to disable the green default position. However, you don't want to do that. Much of the web won't work at all if you turn it off. Web sites you routinely visit may (likely) suddenly stop responding to your input.
I have the pop up blocker activated on my phone if that is what you mean by an ad blocker.
Not the same thing. The built-in popup blocker doesn't really help all that much.
or what kind of ad blocker you use
An ad blocker is by far the best choice. There are quite a few free ones, and they work very well. I use AdGuard. If you try that one, after installing and activating it in System, make sure to open the app itself and turn on the option for Annoyances. This one is off by default, but does most of the blocking. Such as those "annoying" Amazon and Comcast popups and redirects.