When Yamaraja and his assistants take a living entity away to the place of judgment, the life, life air, and desires, being followers of the living entity, also go with him. This is confirmed in the Vedas. When the living entity is taken away or arrested by Yamaraja (tam utkramantam), the life air also goes with him (prano ‘nutkramati), and when the life air is gone (pranam anutkramantam), all the senses (sarve pranah) also go along (anutkramanti). When the living entity and the life air are gone, the lump of matter produced of five elements–earth, water, air, fire, and ether–is rejected and left behind. The living entity then goes to the court of judgment, and Yamaraja decides what kind of body he is going to get next. This process is unknown to modern scientists. Every living entity is responsible for his activities in this life, and after death, he is taken to the court of Yamaraja, where it is decided what kind of body he will take next. Although the gross material body is left, the living entity and his desires, as well as the resultant reactions of his past activities, go on. It is Yamaraja who decides what kind of body one gets next in accordance with one’s past actions.
Source: A.C. Bhaktivedanta Swami Prabhupada (2014 edition), “Srimad Bhagavatam”, Fourth Canto, Chapter 28 – Text 23