Often, all these files live on the same server. As each one is requested, your browser sends some identifying information to the server, but that’s fine – you navigated to somesite.com, so you’re happy to help somesite.com display that content to you in the most optimal way possible.
Finally, there’s a ton of other stuff that gets loaded with a web-page. For example, some sites include tiny images that are loaded from third party sites (the so-called Facebook Pixel is one example), which, again, are used for Analytics. That video player that’s showing that funny cat video is actually loading from another site and dropping its cookies.
In fact, a quick experiment, run after GDPR Day, showed that the same page, when shown in the US was one hundred times larger than the same page, stripped of trackers, shown in the EU. So not only are these things tracking you, they’re also using up your data allowance and slowing everything down.
Disclaimer: All the information here is greatly simplified. Don’t write in and complain that I’ve got it wrong. Pretty please?