The philosophical doctrine known as utilitarianism was the creation of Jeremy Bentham and James Mill, who felt the need for a rule-of-thumb guideline for legislators that would improve the quality of the legislation that they produced. Its central tenet was that legislation would be good insofar as it served to increase the general happiness of society, or alleviated its suffering (which is another way of saying the same thing). Bentham assumed that human beings had two basic driving motivations, the pursuit of pleasure and the avoidance of pain. This idea can be traced back to the Greeks, and is known as hedonism (a variant of which is associated with Epicurus). Bentham thought that the resulting level or quantity of happiness could be worked out by what he termed the felicity calculus.
The most famous name associated with the term utilitarianism, however, and the person responsible for having cast it as an important ethical doctrine, is John Stuart Mill, who was brought up on this diet by his father James, and by Bentham, his Godfather. Mill refined the idea further by noting that it was not only the quantity that mattered, but also the quality of the pleasure involved, famously arguing that
“it is better to be a Socrates dissatisfied than a pig satisfied”
Utilitarianism's concern with the results of actions makes it part of a wider approach to ethics known as consequentialism, which shares the concern with consequences, but allows that there may be other goods that are sought after, not merely, or even principally, pleasure or pain.
Utilitarianism, as originally conceived, is what is now called act utilitarianism - one should act in such a way to maximize the general happiness, calculable in each specific case. Should you fly to New York City or stay at home? Work out the consequences of each choice and do that. This is difficult to do in every single case: when you are standing at the side of the road and need to make a split-second decision whether or not to jump out in front of the bus to save someone, you do not have time to calculate whether or not going to your dentist's appointment is going to cause more happiness than saving someone from being hit by the bus. It is from the difficulty of weighing up every single decision in life that the need for rules comes about. Rule utilitarianism is a utilitarian approach where the individual acts are based on rules, but those rules are decided by appeal to a utilitarian calculation of resulting happiness.
An important concern with utilitarianism is the question of whose happiness is being quantified. Utilitarianism does not easily solve questions of whether or not someone is an agent deserving of moral consideration. Utilitarian cases can be made over euthanasia or abortion, dependent only on the drawing of the boundary lines of the moral community. Peter Singer is an example of a utilitarian moral philosopher who thinks that we have not drawn the lines correctly - pointing out, consistently with the utilitarian ethic - that 'personhood' (that is, being an agent of moral consideration) should be granted to those who have the ability to consciously suffer. Singer, then, states that there are a great number of non-human animals which have the ability to suffer, and some human animals who are not at the stage of being able to suffer. He rejects membership of any particular species being a factor in deciding whether or not that creature is a moral agent.