How can 10 separate villages be called a "town"?
The simple answer is perhaps that it is not called a "town", it is called a
localidad. Again, see ES Wikipedia for
Oreña and for
Alfoz de Lloredo.
Perhaps this is another case where concepts simply cannot be translated by one single word into English, and understanding depends on the context. Certainly in other countries, but presumably in Spain, too, the word in question, such as
Gemeinde or
commune can denote either the local administration or the geographical entity (which doesn't have to be a continuous area and which doesn't have to include one smaller entity that has the same name as the whole) or the local population/inhabitants, depending on the context. The English word would be
municipality but that word is not used as often or in the same way in English.
The
Spanish Wikipedia article has a nice long list for the terms for
municipality or equivalent in numerous countries. The corresponding
English Wikipedia article has a much shorter list and lacks this international dimension; it has a bit more information about usage in English-speaking countries.
I'm not sure how to explain this well. Understanding words of another language does not mean just knowing the words and what the corresponding words would be in one's own language, like a dictionary does. It involves a bit more.