It's determined by looking at all of the questions in the current list and totaling their tag counts.
If you scan down the list of "related tags" and at the same time scan down the list of questions, you'll see that they basically match.
Normally, your view would consist of questions all containing a specific tag, so "related tags" tells you which tags are shared most often (sort of a "customers who bought this product also bought..." feature). If you just go to the questions page, you're not looking at any specific tag, so the "related tags" is telling you the tags belonging to the newest questions (or top-voted questions, or whatever you're looking at).