Utilitarianism is both a metaethical doctrine, and a theory in normative ethics. Utilitarianism holds, in its simplest form, that the good is whatever yields the greatest utility. Utility is understood to be roughly pleasure or happiness. As a metaethical doctrine, it holds that "whatever yields the greatest utility" is the meaning of the word "good" (thus it is a naturalistic theory of metaethics); while as a normative theory, it merely holds that "whatever yields the greatest utility" is in fact good, whatever the meaning of the word "good" may be.
Utilitarianism was originally proposed in 18th century England by Jeremy Bentham and others, although it can be traced back to ancient Greek philosophers such as Epicurus. As originally formulated, utilitarianism holds that the good is whatever brings the greatest happiness to the greatest number of people.
Utilitarianism suffers from a number of problems, one of which is the difficulty of comparing happiness between different people. Many of the early utilitarians believed that happiness could somehow be measured quantitively and compared between people, through a felicific calculus, although no one has ever managed to construct one in practice. It has been argued that the happiness of different people is incommensurable, and thus a felicific calculus is impossible.
Utilitarianism has been opposed for leading to a number of conclusions contrary to common sense morality. For example, if one was given the choice of saving one's child or two strangers, utilitarianism would seem to suggest saving the strangers instead of one's child, since two people will have more total future happiness than one. This seems contrary to common sense, especially to the feelings on duty towards those who they are close that humans have.
To try to get around some of these cases, different varieties of utilitarianism have been proposed. The traditional form of utilitarianism is act utilitarianism, which states that each act is to be evaluated individually. An alternative form often proposed is rule utilitarianism, where the principle of "whatever yields the greatest utility" is applied not to individual acts, but to decide upon ethical rules; these ethical rules are then applied to individual acts. Another variety of utilitarianism is preference utilitarianism, where rather than maximising utility, the ethical objective is to try to satisfy everyone's preferences (Peter Singer is a proponent of preference utilitarianism, who uses it to derive some highly controversial conclusions.)
Relationship with Hedonism?
John Stuart Mill wrote a famous (and short) book called Utilitarianism, about Utilitarianism. Although Mill was a utilitarian, he argued that not all forms of happiness are of equal value, using his famous saying "It is better to be Socrates unsatisfied, than a pig satisfied."
Utilitarianism is the classic consequentalist theory of ethics, and as such is opposed to non-consequentalist theories, such as deontology or virtue ethics.