Q: What happens, in what sequence, when the soul leaves the human body?
A: There's no one exact way for all. How and when a person will leave his body and where he will go depends mainly on his guna and karma (joined with interventions by others through blessings, prayers, rites, etc.)
From accounts of dying persons and hospital staff coupled with the sastric descriptions (mainly Vedanta sutra, BG, Puranas) these things happen:
Several days/hours before death the person enters the terminal phase. Often it has a form of terminal restlessness (a medicinal term, see below). He sees his dead ancestors and specific ativahika (escorting) devatas and may communicate with them.
His body gradually turns cold starting from extremities. This is due to the detachment and withdrawal of the prana, a part of the subtle body, from the gross body.
The exit itself happens through various bodily orifices, as per one's karma and destination. (BG 14.18)
If the person is impious and quite sinful, the messengers of Yamaraja, called the Yamadutas, fierce, horrible looking persons with twisted features, copper red flaming hairs that stand on end, black in complexion and frightening to behold, appear at the deathbed of the person in question and drag him forcibly from his body with ropes and chains. This scene so frightens the person that he literally dies of fright. They then pack up the subtle body of the person in a bag, where they take the soul, now covered only by the subtle body of mind, intelligence and false ego, to the abode of Yamaraja for judgement. He is taken over long stretches of hot, dry sands, and along the way he is insulted in various ways by other horrible creatures and bitten by dogs. He is suffering terribly on this journey and he wishes it would end.
Garuda Purana 2.2.8 says that those who commit suicide (and die a violent death in general) become ghosts. See also: Questions about suicide and ghosts
(The movie "Ghost" presented a world that included ghosts, psychic powers, Yamaduta-like spirits, and an effulgent heavenly realm. Also see the real-life stories below.)
However, when it does end he is taken before Yamaraja, the fierce demigod in charge of death and punishing the sinful. He is forced to accept a position of suffering according to his sins in hell(s) which exist at the bottom of the universe, just above the Garbhodaka Ocean. In this hellish region called the Naraka, there are approximately 27 hellish places. He gets an airy, unbreakable body based on his specific karma (Garuda Purana 2.18.40) to suffer in.
As an example of this a person who has engaged in the slaughter and eating of other innocent animals will enter into Krimibhojana, wherein he will exist as a worm who is eating the tail of another worm as that worm is eating his tail. There are many such hells just according to the crimes committed. One may find the complete description in the last chapters of the 5th canto of the SB.
After such intense and horrible forms of suffering the living being is thrown again into the lower species of life just suited according to his sinful desires in his human life.
However, persons who are not quite that sinful may expect a more peaceful departure from the body. At the time of death, death is denoted as the moment when the spirit soul departs from the material gross body. At that time the soul, covered by the subtle body of mind, intelligence and false ego, leaves the body. The subtle body always travels with the soul wherever he goes within this material world and therefore the living entity has a continuity of material experience throughout his different lifetimes.
Death may come from a variety of causes, but when it actually happens the first thing that a person experiences is total blackness. All is dark, but this lasts only for a moment. The Supersoul, situated right next to the soul, illuminates a hole which appears to the soul to be a light at the end of a tunnel. In fact the darkness which appears is the body but now that it is dead it is devoid of consciousness and now we are seeing it from the inside for the first time.
There are some 118 different passageways through which one might depart from the body. One may only go through one of these at the time of death. These passageways are called nadis, or channels of consciousness. According to Garuda Purana 1.67 death occurs when both main (spine) nadis, Ida and Pingala, are at work. Under normal conditions they switch. One might understand them to be the major nerve channels of channels of energy flow within the body, but the exact medical synonym is not available to us at this time. In any case one will depart from one of these nadis to his next destination. We do know that one who departs from the anus or genital goes to the lower regions, wherein one who departs from the upper portion of the body goes to the higher regions. Those who depart from the top of their skulls, from the hole known as the brahma randhra, the place where the three bones in the skull meet, will attain the regions of Brahman.
Description of yogic death by merging the elements of one's body into mahat-tattva is given in SB 1.15.41-42, 2.2.30, 4.23.15-18, 7.12.30-31, Vs 4.2.15-16, etc. This process goes on in yogi's consciousness. Sridhara Swami speaks about giving up attraction to different sense objects (BG 2.67) and merging the sense into their objects (tan-matras).
The Supersoul illuminates only one of these passageways according to the karma of the soul. He selects the passageway just according to the previous activities of the living entity and as soon as it is illuminated the soul naturally wants to move towards the light. As soon as he is out of the body, he feels relieved of the burden of the material frame and starts to move, naturally drawn towards his next form. He's lead by various guides called ativahika devatas. Description is in Vedanta-sutra 4.2.7-4.3.16. At that time he will experience the world from the point of view of the subtle body and will see things much clearer than they are seen through the present body. Just try to imagine how much more beautiful the world must be when seen through spiritual eyes!
Vedanta-sutra describes that not-too-sinful persons go to higher planets. According to NDE they may meet their departed relatives there. After time alotted by their karma they must return to earth though.
"In the process of sacrifice, the living entity makes specific sacrifices to attain specific heavenly planets and consequently reaches them. When the merit of sacrifice is exhausted, the living entity descends to earth in the form of rain, then takes on the form of grains, and the grains are eaten by man and transformed into semen, which impregnates a woman, and thus the living entity once again attains the human form to perform sacrifice and so repeat the same cycle. In this way, the living entity perpetually comes and goes on the material path. The Krsna conscious person, however, avoids such sacrifices. He takes directly to Krsna consciousness and thereby prepares himself to return to Godhead." (BG 8.3 p., quote from Chandogya Upanisad)
striyah pravista udaram
striyah pravista udaram
"The Personality of Godhead said: Under the supervision of the Supreme Lord and according to the result of his work, the living entity, the soul, is made to enter into the womb of a woman through the particle of male semen to assume a particular type of body." (Srimad Bhagavatam 3.31.1)
When the embryo is about seven months of age it is sufficiently developed to support consciousness and the baby awakens in his new body and immediately moves, sometimes kicking the mother from within in a vain attempt to get out of the horrible entanglement that he has found himself in.
If he is pious, this horrible condition of having the arms and legs jammed into the chest as one is bent over in the foetal position, causes the soul to pray to the Lord as follows, "O Lord, this condition is terrible. Please save me from this situation and get me out of this womb immediately and I promise to serve You in this lifetime for sure." However, as soon as he takes his birth he becomes too much attached to all the attention and service being rendered him by mother and family members and he forgets all about serving the Lord and falls totally into maya again.