If not, it looks a little further away, and so on. When it finds the data it needs, it stores it close by, in a cache, with the assumption that it will be used again. If no space is left in the cache, it bumps out something old to make room for the new thing. If your computer finds most things it looks for in a fast nearby cache, then it seems like all of your slow, cheap storage is as fast as that small, expensive cache. Networks are slow.
Modems are even slower.
When you go to a web page to download its text and images, it can take a long time using a modem. We know that most web pages don't change much. It would be nice if we didn't have to pull all that data across the network and down through the modem every time we want to view a page. So each time we read a page, the page and all its graphics and other files are stored nearby, in a cache, in case we go there again in the near future. Different browsers have different settings for their cache.