This article looks at what scripts actually are, why the number running on a page varies so widely, and what you can adjust if you want a cleaner experience. Toward the end, it covers where an ad-blocking extension fits, since scripts and on-page clutter are closely linked.
What Website Scripts Do
A website script is a small program that runs inside your browser as a page loads. Its job is to make the page respond to you rather than sit there as fixed text.
Most of the features people take for granted depend on scripts. A search box that suggests results as you type, an image gallery you can swipe through, a shopping cart that updates its total, an interactive map you can drag, a comment section that posts without reloading the page: each of these is powered by script running in the background. Strip the scripts away, and most modern sites would fall back to static pages with very little you could interact with.
In short, scripts are one of the technologies that make the web feel responsive. They are not an add-on; they are much of what a page is once it loads.