Utilitarianism is an ethical principle usually attributed to the philosopher Jeremy Bentham. Its basis is very simple: that which brings pleasure is Good; that which causes pain is Bad. To put it another way, the ends justify the means — if an act ultimately brings pleasure or happiness, then the act itself must therefore be ethical. According to utilitarianism, one should consider the possible consequences of an act, but one can't necessarily know whether the act is Good or Bad until the ultimate consequences are revealed in the future.
This philosophy would seem to lead directly to the ethics of hedonism — the belief that pleasure is the most important pursuit of mankind. But John Stuart Mill, in his book Utilitarianism, stated that spiritual, intellectual, and cultural pleasures are of greater value than mere physical pleasures. He also pointed out that the quantity of pleasure should be considered as well, stating that the most ethical choice is that which produces the greatest pleasure for the greatest number of people, or, to quote Star Trek, " . . . the needs of the many outweigh the needs of the few."
Mill's philosophies are embedded in the U.S. Constitution and have been used to justify everything from war, imprisonment, and capital punishment to the order in which patients are seen in an emergency room.
The difficulty in putting utilitarianism into action is deciding how much personal liberty one should sacrifice in order to further the Good of the people. You can see utilitarian principles in action in the current controversy over covert wire-tapping without legal warrant by the U.S. Office of Homeland Security. President Bush's justification for this act is that, by denying the personal liberties of some, he can better serve the greater good.
In fiction, you can see utilitarianism taken to its extremes in novels like Brave New World, The Giver, and Fahrenheit 451. In each of these, "the greater good" — the greatest amount of happiness for the greatest number of people — is achieved by forcing total conformity.