Tapas is the third anga of niyama in raja yoga. Tapas is one of the three items of kriya yoga. Tapas means austerity or practice of penance.
That which purifies the impure mind is tapas. That which regenerates the lower, animal nature and generates divine nature is tapas. That which cleanses the mind and destroys passion, anger, greed, and so on is tapas. That which produces Brahmatejas, the effulgent splendour of Brahman, and destroys one’s negative nature is tapas. That which arrests the outgoing tendencies, extroversion or bahirmukha vritti, and produces introversion or antharmukha vritti is tapas. That which destroys the vasanas, egoism, raga-dwesha and generates dispassion, discrimination and meditation is tapas. Tapas is spiritual discipline. It is worship, sadhana and meditation.
The Bhagavad Gita has given very valuable hints upon the subject of tapas. A flood of light is thrown upon this subject through the divine words of Lord Krishna addressed to Arjuna. The Gita speaks of a threefold tapas of body, speech and mind (17:14–17):
Devadwijagurupraajna poojanam shauchamaarjavam;
Brahmacharyamahimsaa cha shaareeram tapa uchyate.
Anudwegakaram vaakyam satyam priyahitam cha yat;
Swaadhyaayaabhyasanam chaiva vaangmayam tapa uchyate.
Manahprasaadah saumyatwam maunamaatmavinigrahah;
Bhaavasamshuddhirityetat tapo maanasamuchyate.
Shraddhayaa parayaa taptam tapastattrividham naraih;
Aphalaakaangkshibhiryuktaih saattwikam parichakshate.
Worship of the gods, the twice-born, the teachers and the wise, purity, straightforwardness, celibacy and non-injury – these are called the austerities of the body.
Speech which causes no excitement and is truthful, pleasant and beneficial, the practice of the study of the Vedas – these are called the austerities of speech.
Serenity of mind, good-heartedness, purity of nature, self-control – these are called mental austerity.
This threefold austerity practised by steadfast people with the utmost faith, desiring no reward, they call sattwic austerity.
Conventionally, eating neem leaves, standing in water, sitting in the hot sun, bearing heat and cold, standing on one leg with raised hands, and so on are considered as tapas. People speak of such persons as tapasvins. They say, “Ram Brahmachari is a great tapasvi. He lives on leaves and has no clothing. He does panchagni tapas in hot summer.” These are all the forms of physical tapas.
Mental tapas is more powerful than physical tapas. He who bears heat and cold does physical tapas. He increases his power of endurance, but he may not be able to bear insult. He will be easily upset by a harsh or unkind word. He may take revenge and do tit for tat. He has no control over the mind. He has disciplined only his physical body. To keep a balanced mind in all conditions of life, to bear insult, injury and persecutions, to be ever serene, contended and peaceful, to be cheerful in adverse conditions, to have fortitude in meeting danger, to have presence of mind and forbearance, are all forms of mental tapas.
Philosophically, meditation is the highest form of tapas. Fixing the wandering mind on God or Brahman is great tapas. Vichara, constant reflection and contemplation, and nididhyasana, deep meditation, are the highest tapas.