Tapas is heat, creating of a powerful energy, a spiritual practice with the aim of experiencing the Ultimate by highly developed ascetics in order to find liberation from the cycle of birth and death. The one who does tapas is a tapasvin. It is physical mortification, such as standing on one leg for years, rigorous fasting, all accompanied by deep meditation.
In mythology, tapas always generates an energy/power that calls a God, who then has to grant a favor, the God cannot resist the energy. Gods granting favor to demons are usually Brahma and Shiva. Most of the time, Vishnu has to put the chaos that the demons cause in order.
No one fears tapas more than Indra, who always believes that the ascetic is trying to dispute his rank, the King of Gods. Indra then makes use of an apsara, who disturbs the ascetic in his tapas and the power that has built up dissolves. Usually the ascetic then curses the apsara.