Inclusive fitness provides an evolutionary explanation for altruistic behavior among animal communities. When we think of "survival of the fittest," we associate selfish behaviors with organisms that are always seeking to live longer and reproduce more successfully. But inclusive fitness takes into account close genetic relatives in the greater mission of passing on common genes, rather than just one organism's genes. The tenets of Darwinian evolution aren't violated.
When W.D. Hamilton conceived of inclusive fitness in 1964, he was thinking of reasons that some animals seem to do things that benefit someone above themselves. Perhaps he considered ant colonies where sterile workers labor endlessly to benefit the queen and the colony at large, without any hope of reproducing. Didn't this contradict the fundamental tenet of evolution that an organism's goal is to live long enough to reproduce, and that the reproducers represent the strongest of the bunch?
Instead of restricting an organism's urge to reproduce only its own exact genetic code, Hamilton widened its urge to include behaviors that would enable the passage of genes closely related to it. This means that animals act, first, to protect themselves, but will also act to protect their closest family members, such as parents and siblings, because they share some of its genes. Under rarer circumstances its behavior will protect further relatives, like cousins and parent's siblings. When the costs don't outweigh the benefits, we observe so-called altruism in many animal communities that is better explained by inclusive fitness.
For example, prairie dogs will work cooperatively in looking out for predators. If one spots a snake, it will sound a warning so the others can take cover. However, by making a noise, the prairie dog actually calls attention to itself, and the snake is more likely to attack it. Inclusive fitness makes sense of this unintuitive behavior by pointing out that the prairie dog's relatives, the ones that share many of its genes, will be at an advantage to survive and reproduce. In this sense, "fitness" means the likelihood of a genome, a collection of genes, to get passed on to the next generation.
Those who study inclusive fitness have developed a handy equation that shows when the costs of altruism do or do not outweigh the benefits. R stands for the degree of relatedness of two individuals. R is higher when they're closely related, like whole siblings, and lower when they are distant relations. C is the cost to the individual if it risks the behavior, represented as the probability it won't get to reproduce. Finally, B is a number measuring the benefit the altruist act provides to the recipient. Therefore, if R times B minus C is greater than zero, then the animal will act "altruistically" in the name of inclusive fitness.