Tapas means austerity and not Dhyana (which is meditation). And "Tapasya" is "performing austerities".
Tapasya is basically performed by forcefully subduing the sensory organs. So, it involves not-so-pleasurable acts like fasting etc.
From Sandilya Upanishad's 1st Chapter:
- Under Niyama (religious observances), are ten, viz., Tapas, Santosha Astikya, Dana, Ishvarapujana, Siddhanta-Sravana, Hrih, Mati,
Japa and Vrata. Of these Tapas, is the emancipation of the body
through the observances of such penances as Krichchhra, Chandrayana,
etc., according to rules. Santosha is being satisfied with whatever
comes to us of its own accord. Astikya is the belief in the merits or
demerits of actions as stated in the Vedas. Dana is the giving with
faith to deserving persons, money, grains, etc., earned lawfully.
Ishvarapujana is the worshipping of Vishnu, Rudra, etc., with pure
mind according to one’s power. Siddhanta-Sravana is the inquiry into
the significance of Vedanta. Hrih is the shame felt in the performance
of things contrary to the rules of the Vedas and of Society. Mati is
the faith in the paths laid down by the Vedas. Japa is the practising
of the Mantras into which one is duly initiated by his spiritual
Now, the fasts mentioned above, like Chandrayana etc, are very cumbersome and in today's time those are virtually impossible to be performed by a householder. For someone, who is leading a life of an ascetic, it's possible though.
Rules of how to perform these austerities are found in almost all scriptures like Smritis, Puarnas, Upanishads.
For example from Devi Bhagavatam (Book 11, Chapter 23):
34-54. One becomes freed of all the sins, if one performs the above
five Chândrâyanas. By the performance of the Tapta Krichchhra, all
sins are burnt off in an instant. By the performance of the three
Chândrâyanas the people get purified and go to the Brahma Loka. By
doing eight Chândrâyanas, one sees face to face one’s Devatâ, ready to
grant boons. With ten Chândrâyanas, one gets the knowledge of the
Vedas and one acquires all what one wants. In the observance of the
Krichchhra Prâjâpatya Vrata, one has to take food once in midday for
three days, once in the evening for three days, and for the next three
days whatever one gets without asking anything from anybody. For the
next three days one is not to take any thing at all and go on with
one’s work. These twelve days’ work constitutes the Prâjâpatya Vrata.
Now about the rules of the S’ântapana Vrata. On the preceding day one
has got to eat food consisting of the mixture of cow urine, cow-dung
milk, curd, ghee and the water of the Kus’a grass; the day following
he is to fast. These two days’ work constitutes the S’ântapana Vrata.
Now about the Ati Krichchhra vrata. For the first three days, one is
to eat one mouthful of food a day and for the next three days one is
to fast. This is the Ati Krichchhra vrata. This vrata repeated three
times is called Mahâ S’ântapana vrata
So, as you can see all of those austerities involve prolonged fasting and/or extremely restricted food intake.
Also, Yoga has 8 limbs like Yama, Niyama etc. And, under Niyama comes Tapas.
See the following passage from the Varaha Upanishad (which is linked with the Krishna Yajurveda):
- He should practise Mantra-Yoga. Laya-Yoga and Hatha-Yoga, through mild, middling and transcendental methods (or periods) respectively.
Laya, Mantra and Hatha-Yogas have each (the same) eight subservients.
11-12(a). They are Yama, Niyama, Asana, Pranayama, Pratyahara,
Dharana, Dhyana and Samadhi. 12(b)-13(a). (Of these), Yama is of ten
kinds. They are non-injury, truth, non-coveting, continence,
compassion, straightforwardness, patience, courage, moderate eating
and purity (bodily and mental). 13(b)-14. Niyama is of ten kinds.
They are Tapas (religious austerities), contentment, belief in the
existence of God or Vedas, charity, worship of Ishvara (or God),
listening to the expositions of religious doctrines, modesty, a (good)
intellect, Japa (muttering of prayers) and Vrata (religious
observances). 15-16. They are eleven postures beginning with Chakra.
Chakra, Padma, Kurma, Mayura, Kukkuta, Vira, Svastika, Bhadra, Simha,
Mukta and Gomukha are the postures enumerated by the knowers of Yoga.
So, Tapasya is also a part of Yoga. Therefore, it should be performed after being duly instructed by the Guru and after obtaining permission from him.
The Niralamba Upanishad (a minor Upanishad) is peculiar because it is comprised wholly of just questions and answers. First it poses a whole list of questions and then it goes on answering those questions.
The question list is like as given below:
I shall raise and answer (questions covering) all that must be known for liquidating the misfortunes of living beings plunged in
(1) What is Brahman ?
(2) Who is God ?
(3) Who is living being ?
(4) What is Prakriti ?
(5) Who is the Supreme Self ?
(6) Who is Brahma ?
(7) Who is Vishnu ?
(8) Who is Rudra ?
(9) Who is Indra ?
(10) Who is (the god of) Death ?
In this list of question a question is "What is Tapas?"
And the answer to it is given as follows:
(36) Demoniac is the austerity, rooted in entrenched attachment,
aversion, destructive violence, hypocrisy, etc.; that torments oneself
by performing ‘repetition of holy names’ and Agnihotra while fasting
and that is prompted by the desire to secure the power of gods like
Brahma, Vishnu, Indra and Isana.
- (37) Austerity is the burning, in the fire of immediate realization of the world’s falsity, of the seed of imagination
fashioned by the desire to secure the power of Brahma, etc.
Interesting thing to note here is that since Tapas always involves subjugation of the senses (the Indriyas which are one deity or the other) hence it is identified with the demons (Asuras) - the enemies of the deities.
Also, the Puranic stories confirm that the Asuras are more adept (than the gods) in performing these austerities which eventually helped them in acquiring powerful boons.
And, apart from that the Gautama Smriti 19.7 also gives the list of actions that are considered as austerities:
All mountains; all rivers; sacred lakes; sacred fords; dwellings of
seers; cow-pens; and temples––these are the appropriate places.
Observing chastity; speaking the truth; bathing at dawn, noon, and dusk; remaining in wet clothes after the bath; sleeping on the floor;
and fasting–– these are the austerities.
Gautama Smriti 19.7