Kin selection is the principle that genetic material could best be passed down by helping one’s relatives even if it meant the individual’s reproductive success might suffer. Bees are a prime example of this behavior. A large majority of a hive is sterile and the worker bees leave all reproductive duties to the queen.
J.B.S. Haldane, one of two men who described the evolutionary strategy in mathematical terms, wrote "I would lay down my life for two brothers or eight cousins.” This stems from the fact that, on average, siblings share 50% genetic material and cousins share 12.5% genetic material. The way the numbers work out, as long as these saved individuals passed on their genetic material, it makes sense to forfeit reproduction (read: lay down one’s life) for groups of relatives these minimum sizes.