Purity in Buddhism
Purity (Pali: Vissudhi) is an important concept within much of Theravada and Mahayana Buddhism, although the implications of the resultant moral purification may be viewed differently in the varying traditions. The aim is to purify the personality of the Buddhist practitioner so that all moral and character defilements and defects (kleśas such as anger, ignorance and lust) are wiped away and nirvana can be obtained. Theravada 

Theravada Buddhism regards the path of self-purification as absolutely vital for reaching Nibbana. The main task of the Theravada Buddhist monk is to eradicate flaws in morality and character through meditation and moral cultivation, in alliance with the cultivation of insight or wisdom (Paññā), so that the purity of Nibbana can be achieved. So important is this notion of purity in Theravada Buddhism that the famed Buddhist monk and commentator Buddhaghosa composed a central thesis on dhamma called The Path of Purification (Visuddhimagga). Mahayana

Tathāgatagarbha 
Controversially, according to the Mahayana Tathāgatagarbha sutras, the unsullied essence of a being—the "true self", or Buddha-nature—can become manifest once the temporary and superficial contaminants (kleśas) have been eradicated from its presence. In the Śrīmālādevī Siṃhanāda Sūtra, there are two primary states of the Tathāgatagarbha. One is when it is covered with defilements and known as the "embryo of the Tathāgata" (Tathāgatagarbha). The other is when it becomes free from defilements, and is no more the "embryo",  but the Tathāgata or Dharmakāya. The Mahābherīharaka Sūtra elaborates that at the time one becomes a Tathāgata, one dwells in Nirvana and may be referred to as "permanent", "steadfast", "calm", "eternal" and "self" (ātman). These contaminants are seen as extrinsic to, rather than inherent within, the essence of the being. The attainment of Buddhahood, resulting after eliminating the kleśas, is referred to in the Tathāgatagarbha literature and in the works of the Tibetan Jonangpa Lama Dolpopa as the "pure Self" (śuddha-ātman). Perfection of wisdom

In contrast to the Tathāgatagarbha theory, the Perfection of Wisdom Sutras state that there is no basis to conceptualizing impurity and purification, as both are ultimately illusory. Neither has an enduring essence, which is not to say that they are false, but merely the result of conventional names and concepts. Nevertheless, these scriptures also endorse and elaborate on the need to detach from all moral defilements if Buddhahood is to be reached for the sake of awakening all sentient beings. See also 

Anattā and Ātman (Buddhism)
Bhavana 
Four Noble Truths
Luminous mind
Mahāyāna Mahāparinirvāṇa Sūtra
Noble Eightfold Path
Reality in Buddhism
Threefold Training
Visuddhimagga

Further reading 
Purity of Heart: Essays on the Buddhist Path, by Ṭhānissaro Bhikkhu, Amaravati Publications (2012)
Hopkins, Jeffrey (2006). Mountain Doctrine: Tibet's Fundamental Treatise on Other-Emptiness and the Buddha Matrix - by: Dolpopa, Jeffrey Hopkins, Snow Lion Publications, Hardcover, 832 Pages. The Mahayana Mahaparinirvana Sutra in 12 Volumes tr. by Kosho Yamamoto, ed. by Dr. Tony Page, Nirvana Publications, London, 2000. The Srimala Sutra tr. by Dr. Shenpen Hookham, Longchen Foundation, Oxford, 1995. References 

Buddhist belief and doctrine