The perfection of yoga and the imitation of yoga
The perfection of yoga is that one can give up one’s body or release oneself from the embodiment of material elements according to one’s desire. Yogis who have attained perfection are not subject to death by natural laws; such perfect yogis can leave the body whenever they desire. Generally the yogi first of all becomes mature in controlling the air passing within the body, thus bringing the soul to the top of the brain. Then when the body bursts into flames, the yogi can go anywhere he likes. This yoga system recognizes the soul, and thus it is distinct from the so-called yoga process for controlling the cells of the body, which has been discovered in the modern age. The real yoga process accepts the transmigration of the soul from one planet to another or one body to another.
Srimad Bhagavatam 4.4.24 purport