They don't mean the same thing. It's idiom, if you like. In English we use the same words for two different meanings.
It's really "how stand the boys?" as in how do they stand, how well do they stand ... how are they? (You hear it some times in older English war movies; how stand the men, how fare the men.) Spanish also splits "identity" (they are) from "current state of being" (they are like such-and-such) into two different words: essere and stare, which one can trace all the way back to Latin (where'd the Latin get it? Some body knows, but it doesn't matter).
German, interestingly, says "how go the boys" instead of "how stand the boys" or "I go well" (actually: my going is good). Go figure...
Italian has two different verbs that translate as "to be". Spanish does as well, but they're not fully parallel to each other.
[turn on captions in the embedded video]
Because where we use the verb 'to be' in English (which is where we get the 'are' in "How are the boys?"), Italian uses the verbs essere AND stare. For "they are" (third person plural) with essere —>sono; with stare –>stanno.
Here's a useful article to explain when to use stare and when to use essere. https://italianonlinetutor.org/2010/09/09/difference-between-stare-and-essere/