In order to understand the evolution of a behavior (like whether a colony will accept multiple queens or remain loyal to just one), it often helps to think of evolution as a game. In this game, the “players” are the organisms. As in chess, the organisms can adopt different “strategies” — but, unlike chess, these strategies are behaviors that are encoded in the players’ genes. The “winner” of this evolutionary game is the player who gets the most genes into the next generation by having a lot of offspring. Evolutionary theory predicts that the winning strategy for getting genes into the next generation will spread through a population via natural selection.
Take a look at the basic Rules of Natural Selection.