It is well known that the aim of the Siddhas, Nāthas and other yogins is the attainment of immortality. But what kind of immortality is it? Do these yogins seek immortality in some kind of a spiritual and non-material body, or do their texts speak about immortality in a physical, material body? Although the precise nature of immortality is not explicitly described in the yogic Sanskrit literature, some verses seem to support the concept of corporeal immortality in a material (bhautika) body.
Several techniques are used to achieve this goal. The first one, called khecarīmudrā, deals with the nectar of immortality (amṛta) and is the subject of a brilliant study by James Mallinson.
The second technique is the 'mastering of elements' (bhūtajaya or bhūtasiddhi), by which a yogin can overcome the limitations of the material world, being no more bound by mundane laws of nature. Another technique is 'cheating death' (mṛtyuvañcana, kālavañcana).
It consists of two steps. First, the yogin must recognize the precise moment of his coming death.
For this purpose, he should acquire the 'knowledge of death omens' (ariṣṭajñāna). In the second step the yogin must do some act at the very moment death is approaching him.
He can for a while leave his body and enter into another body, so when the moment of death comes, there is nobody to die. After the moment of death has passed, the yogin can return back into his body.
Or, he can enter into the samādhi - while being in this state, death has no power over him. It seems that death only comes once in a lifetime and if it does not succeed, it never returns and the yogin becomes immortal in his physical body.