Hedonism is a school of philosophy from the Socratic and Hellenistic periods of ancient Greece, which holds that pleasure is the most important pursuit of mankind, and that we should always act so as to maximize our own pleasure.
The earliest manifestation of Hedonism was Cyrenaicism (which was popular in the 4th and 3rd Centuries B.C.), although arguably, Democritus had propounded a very similar philosophy even earlier. As a movement, it was founded by Aristippus of Cyrene (c. 435 - 360 B.C.), a pupil of Socrates, who emphasized one side only of Socratic teaching (that happiness is one of the ends of moral action) to the exclusion of all else. The Cyrenaics emphasized bodily gratification as more intense and preferable to mental pleasures, and denied that we should defer immediate gratification for the sake of long-term gain, two major points of departure from the similar, but more modest, school of Epicureanism.
During the Middle Ages, Christian philosophers largely denounced Hedonism, which they believed was inconsistent with the Christian emphasis on avoiding sin, doing God's will, and developing the Christian virtues of faith, hope and charity. However, Renaissance philosophers such as Erasmus and Sir Thomas More revived Hedonism to some extent, defending it on the religious grounds that pleasure was in fact compatible with God's wish for humans to be happy.
Libertinism is a philosophy related to Hedonism, which found adherents in the 17th, 18th and 19th Centuries, particularly in France and Britain, including the 2nd Earl of Rochester (1647 - 1680), the Marquis de Sade (1740 -1814) and the occultist Aleister Crowley (1875 - 1947). Libertinism ignores, or even deliberately spurns, religious norms, accepted morals, and forms of behaviour sanctioned by the larger society, and encourages gratification of any sort, especially sexual.
The 19th Century ethical theory of Utilitarianism, propounded by the British philosophers John Stuart Mill and Jeremy Bentham, developed and refined Hedonism, concluding that we should perform whichever action is best for everyone ("the greatest good for the greatest number"). Bentham believed that the value of a pleasure could be quantitatively understood, while Mill perferred a qualitative approach dependent on the mix of higher quality pleasures and lower quality, simple pleasures.
Contemporary Hedonists, as represented by an organization known as Hedonist International, strive first and foremost for pleasure, as did their predecessors, but with an additional emphasis on personal freedom and equality.