The Buddha advised his first five disciples against too much sensual pleasure because these pleasures were base, worldly, not noble and unhelpful in spiritual development. On the other hand, tormenting the body was painful, not noble and also unhelpful in spiritual development. He advised them to follow "the Middle Way", which is helpful in seeing things clearly, as they are, and in attaining knowledge, higher wisdom, peace, and enlightenment or nirvana.
The Buddha then taught the Four Noble Truths. They are: the truth of suffering; its cause; its end; and the way to its end. Everything in this world is full of suffering, and the cause of suffering is craving. The end of suffering is nirvana. The way to the end of suffering is via the Noble Eightfold Path.
adapted from http://www.buddhanet.net/e-learning/buddhism/lifebuddha/2_2lbud.htm