An ancient maxim found in the Dhammapada sums up the practice of the Buddha's teaching in three simple guidelines to training: to abstain from all evil, to cultivate good, and to purify one's mind.
These three principles form a graded sequence of steps progressing from the outward and preparatory to the inward and essential. Each step leads naturally into the one that follows it, and the culmination of the three in purification of mind makes it plain that the heart of Buddhist practice is to be found here.
Purification of mind as understood in the Buddha's teaching is the sustained endeavor to cleanse the mind of defilements, those dark unwholesome mental forces which run beneath the surface stream of consciousness vitiating our thinking, values, attitudes, and actions.
The chief among the defilements are the three that the Buddha has termed the "roots of evil" — greed, hatred, and delusion — from which emerge their numerous offshoots and variants: anger and cruelty, avarice and envy, conceit and arrogance, hypocrisy and vanity, the multitude of erroneous views.
Contemporary attitudes do not look favorably upon such notions as defilement and purity, and on first encounter they may strike us as throwbacks to an outdated moralism, valid perhaps in an era when prudery and taboo were dominant, but having no claims upon us emancipated torchbearers of modernity. Admittedly, we do not all wallow in the mire of gross materialism and many among us seek our enlightenments and spiritual highs, but we want them on our own terms, and as heirs of the new freedom we believe they are to be won through an unbridled quest for experience without any special need for introspection, personal change, or self-control.
However, in the Buddha's teaching the criterion of genuine enlightenment lies precisely in purity of mind. The purpose of all insight and enlightened understanding is to liberate the mind from the defilements, and Nibbana itself, the goal of the teaching, is defined quite clearly as freedom from greed, hatred, and delusion. From the perspective of the Dhamma defilement and purity are not mere postulates of a rigid authoritarian moralism but real and solid facts essential to a correct understanding of the human situation in the world.
~ Bodhi Bhikkhhu
https://www.accesstoinsight.org/lib/...-essay_04.html