
To free ourselves from suffering fully and finally we have to eliminate it by the root, and that means to eliminate ignorance. But how does one go about eliminating ignorance? The answer follows clearly from the nature of the adversary. Since ignorance is a state of not knowing things as they really are, what is needed is knowledge of things as they really are.
Not merely conceptual knowledge, knowledge as idea, but perceptual knowledge, a knowing which is also a seeing. This kind of knowing is called wisdom (pañña). Wisdom helps to correct the distorting work of ignorance. It enables us to grasp things as they are in actuality, directly and immediately, free from the screen of ideas, views, and assumptions our minds ordinarily set up between themselves and the real.

These conditions are actually mental factors, components of consciousness, which fit together into a systematic structure that can be called a path in the word's essential meaning: a courseway for movement leading to a goal. The goal here is the end of suffering, and the path leading to it is the Noble Eightfold Path with its eight factors: right view, right intention, right speech, right action, right livelihood, right effort, right mindfulness, and right concentration.
The Buddha calls this path the middle way (majjhima patipada). It is the middle way because it steers clear of two extremes, two misguided attempts to gain release from suffering. One is the extreme of indulgence in sense pleasures, the attempt to extinguish dissatisfaction by gratifying desire. This approach gives pleasure, but the enjoyment won is gross, transitory, and devoid of deep contentment. The Buddha recognized that sensual desire can exercise a tight grip over the minds of human beings, and he was keenly aware of how ardently attached people become to the pleasures of the senses.
But he also knew that this pleasure is far inferior to the happiness that arises from renunciation, and therefore he repeatedly taught that the way to the Ultimate eventually requires the relinquishment of sensual desire. Thus the Buddha describes the indulgence in sense pleasures as "low, common, worldly, ignoble, not leading to the goal."

The error is taking the body to be the cause of bondage, when the real source of trouble lies in the mind — the mind obsessed by greed, aversion, and delusion. To rid the mind of these defilements the affliction of the body is not only useless but self-defeating, for it is the impairment of a necessary instrument. Thus the Buddha describes this second extreme as "painful, ignoble, not leading to the goal."
Aloof from these two extreme approaches is the Noble Eightfold Path, called the middle way, not in the sense that it effects a compromise between the extremes, but in the sense that it transcends them both by avoiding the errors that each involves. The path avoids the extreme of sense indulgence by its recognition of the futility of desire and its stress on renunciation.

by Bhikkhu Bodhi