This system of ethics was an answer to conflicting moral dilemmas, such as lying to save a life. Many people argued against moral absolutism by claiming that if lying is always wrong, then it is sinful to lie even when you are lying to prevent a bigger atrocity, such as hiding Jews during World War II, for example. This strikes many people as unreasonable that God would hold one guilty for committing a sin when they were trying to save lives.
The idea of a moral system based on utility was first put forth by Jeremy Bentham in 1789. It quickly became influential but was taken to even greater heights when John Stuart Mill advanced his version. Though there are some deviations between Mill's and Bentham's version, both maintain the basic belief that people should act in such a way as to promote the greatest happiness for the greatest number of people.1
Before we go too far, I want to unpack these ideas a little bit. Utilitarians cannot base actions on intrinsic rightness or wrongness, because that would require someone higher than humanity to set those standards. Therefore, there must be a self-supporting reason to do action A instead of action B.
Bentham and Mill say that that no action is good or evil in itself, but the results of those actions are the only things that matter. However, the question then arises how do you judge results of an action for their morality if good and evil don't really exist? The answer for the utilitarian is happiness is really what we mean by good. Whatever makes people happy, whatever brings pleasure is a good thing, and what gives people pain is what we mean by evil. This is why utilitarianism is also known as "social hedonism". You should maximize pleasure for the most people while minimizing pain.
What this means when we put it into practice is that lying in and of itself isn't wrong. If you lie and it makes people feel good with no negative effects, you've done nothing wrong. The actions you choose are only considered good or evil based on the results they produce.
While utilitarianism solves some of the problems of conflicting moral situations, it doesn't follow completely. First off, utilitarianism isn't a true moral framework. I say this because it confuses facts with values. Doing that which gives the most people the most pleasure is a statement of circumstance, not a good prescription of actions.
Let me give an example: imagine a married salesman visiting a distant town. He meets a woman, also married, and they instantly feel a powerful attraction to each other. Knowing that they'll never be found out, they embark on a passionate affair for the three days they're together. According to utilitarian ethics, they have not done anything wrong. On the contrary, it would be morally wrong for them to not sleep together because one would be denying the other pleasure!
Another situation shows the problem of the opposite situation. Imagine a young child pinned down in a burning building. Two firemen see her and know they can free her if they work together, but they will almost certainly die in doing so. In such a situation, we would regard the firemen as heroes, but in a consistent utilitarian outlook their actions would have to be labeled a bad. More pain was inflicted in the two men dying than in the saving of the one child.
Besides some of the strange circumstances one may face in utilitarian philosophy, the bigger problem is with the compulsion of subscribing to the philosophy at all. If everyone was a utilitarian, then all actions might be able to be judged within that framework, but you can't call the system itself "good" because that implies a separate criterion.
Lastly, utilitarianism cannot work because, like all morally relative beliefs, it is self-defeating. Suppose everyone in the world were utilitarians. Now, suppose they all met and agreed that it was just too difficult always having to worry about what effects their actions would have on other people. The constant analysis was making their lives miserable. The consistent thing to do, according to utilitarian ethics, is to give up utilitarianism. In order to follow utilitarian beliefs you would have to abandon utilitarian beliefs! Can you see how contradictory this is?
Utilitarianism, while a popular way to try to ground moral truths, doesn't really succeed as a moral system. I takes a pragmatic approach to duties and values and fails to make a distinction between what's right and what's going to make most people happy. It smuggles in the idea that happiness is the greatest good, but it doesn't prove that point. It merely assumes it based on our human nature. However, if Christianity is true, then our nature is corrupted by original sin and it cannot be trusted to provide a grounding for good and evil. So, along with everything above, utilitarianism begs the question. Even though it is so that all people have the desire to maximize pleasure and reduce pain, why should we assume that those desires are right?