I came across this recently and it gets quite complicated pretty quickly but the main idea is this:
Utilitarianism specifies that the best moral action is one that maximises the overall well-being of those involved
We might like to think about this as we try to make decisions about things like electing presidents of the United States or whether the UK should remain fully engaged with Europe. Do we decide what is best for us as individuals or do we decide what is best for the group (humans in general)?
It's a big dilemma but perhaps we should not worry too much as the general trend in human history is towards maximising the well-being of the group. Things like poverty and education have greatly improved for the planet as a whole, even if there are local dips happening all over the place. We all know what is good for everyone once we become aware of it.
Perhaps I'll leave it at that because it gets tangled pretty quickly. The world is a better place than it was because we are achieve greater well-being as a group than we do as individuals trying to carve out our own little corners. It's the way it is.
Now, the interesting part comes when we think about evolution ...