Your web browser stores a stack (or list, if you like) of the web pages you visited in this window. Let's say your homepage is google.com, and from there you will visit several other sites: youtube.com, yahoo.com and cnn.com. When visiting the latter, the list is as follows:
google.com -> youtube.com -> yahoo.com -> cnn.com ^ | current page
When you click the back button, the browser will return you to the previous page in the list, for example:
google.com -> youtube.com -> yahoo.com -> cnn.com ^ | current page
At this point, you can click Back again to go to youtube.com, or you can click Next to send you back to cnn.com. Say you click Back a second time:
google.com -> youtube.com -> yahoo.com -> cnn.com ^ | current page
If you now go to, say, abc.com, the list changes as follows:
google.com -> youtube.com -> abc.com ^ | current page
Please note that both yahoo.com and cnn.com have disappeared from the list. This is because you have chosen a new route. The browser only supports the list of pages that you visited to get to the place where you are now, and not the history of each page that you have ever been to. The browser also does not know anything about the structure of the site you are visiting, which can lead to unexpected behavior.
You are on a shopping site (ne.com, as a brief example) that has categories and subcategories of products to view. The site designer thoughtfully provided breadcrumbs at the top of the window so you can navigate through the categories. You start on the top page of the site, click "Hardware", then "Memory". The list now looks like this:
google.com -> ne.com -> ne.com/hw -> ne.com/hw/mem ^ | current page
You want to return to the Equipment category so that you use breadcrumbs to go to the parent category, instead of using the Back button. Now the list of browsers is as follows:
google.com -> ne.com -> ne.com/hw -> ne.com/hw/mem -> ne.com/hw ^ | current page
In accordance with the structure of the site, you returned (to the level), but you went ahead to the browser because you clicked on the link. Each time you click on a link or enter a URL in the address bar, you move forward as far as the browser is concerned, regardless of whether that link leads to a page that you have already been to.
Finally, you want to return to the main page of the site (ne.com). You can use breadcrumbs, but this time you press the back button - it seems obvious that it should rise one level, right? But where does he take you?
Initially, it confuses many users (including me when I do this) that it “lowers” the level and returns to the “Memory” category. If you look at the list of pages, it’s easy to see why:
google.com -> ne.com -> ne.com/hw -> ne.com/hw/mem -> ne.com/hw ^ | current page
To return to the main page using only the "Back" button, you will need two more clicks, taking you "back" to the "Equipment" category and, finally, to the main page. It seems to us so obvious to us programmers that this is happening, but it constantly surprises all regular users, because they do not understand that the browser does not know anything about the hierarchical structure of any website on which they are located.
Would it be nice if browsers allowed website designers to pay attention to the "Back" button to do the obvious thing (raising the level), and not what it is doing now?
Edit: The commenter asked if the browser reloads the page or simply displays it from its local cache.
The answer depends on that. Website designers can specify whether the browser should cache the page or not. For pages that are set as non-cached, the browser reloads the page from the server when you click Back, as if you had visited it for the first time. For cached pages, the browser displays it from the cache, which is much faster.