SB 10.1.39

dehe pañcatvam āpanne
 dehī karmānugo ’vaśaḥ
dehāntaram anuprāpya
 prāktanaṁ tyajate vapuḥ
Word for word: 
dehe — when the body; pañcatvam āpanne — turns into five elements; dehī — the proprietor of the body, the living being; karma-anugaḥ — following the reactions of his own fruitive activities; avaśaḥ — spontaneously, automatically; deha-antaram — another body (made of material elements); anuprāpya — receiving as a result; prāktanam — the former; tyajate — gives up; vapuḥ — body.
Translation: 
When the present body turns to dust and is again reduced to five elements — earth, water, fire, air and ether — the proprietor of the body, the living being, automatically receives another body of material elements according to his fruitive activities. When the next body is obtained, he gives up the present body.
Purport: 

This is confirmed in Bhagavad-gītā, which presents the beginning of spiritual understanding.

dehino ’smin yathā dehe
 kaumāraṁ yauvanaṁ jarā
tathā dehāntara-prāptir
 dhīras tatra na muhyati

“As the embodied soul continually passes, in this body, from boyhood to youth to old age, the soul similarly passes into another body at death. The self-realized soul is not bewildered by such a change.” (Bg. 2.13) A person or an animal is not the material body; rather, the material body is the covering of the living being. Bhagavad-gītā compares the body to a dress and elaborately explains how one changes dresses one after another. The same Vedic knowledge is confirmed here. The living being, the soul, is constantly changing bodies one after another. Even in the present life, the body changes from childhood to boyhood, from boyhood to youth, and from youth to old age; similarly, when the body is too old to continue, the living being gives up this body and, by the laws of nature, automatically gets another body according to his fruitive activities, desires and ambitions. The laws of nature control this sequence, and therefore as long as the living entity is under the control of the external, material energy, the process of bodily change takes place automatically, according to one’s fruitive activities. Vasudeva therefore wanted to impress upon Kaṁsa that if he committed this sinful act of killing a woman, in his next life he would certainly get a material body still more conditioned to the sufferings of material existence. Thus Vasudeva advised Kaṁsa not to commit sinful activities.

One who commits sinful activities because of ignorance, tamo-guṇa, obtains a lower body. Kāraṇaṁ guṇa-saṅgo ’sya sad-asad-yoni janmasu (Bg. 13.22). There are hundreds and thousands of different species of life. Why are there higher and lower bodies? One receives these bodies according to the contaminations of material nature. If in this life one is contaminated by the mode of ignorance and sinful activities (duṣkṛtī), in the next life, by the laws of nature, one will certainly get a body full of suffering. The laws of nature are not subservient to the whimsical desires of the conditioned soul. Our endeavor, therefore, should be to associate always with sattva-guṇa and not indulge in rajo-guṇa or tamo-guṇa (rajas-tamo-bhāvāḥ). Lusty desires and greed keep the living entity perpetually in ignorance and prevent him from being elevated to the platform of sattva-guṇa or śuddha-sattva-guṇa. One is advised to be situated in śuddha-sattva-guṇa, devotional service, for thus one is immune to the reactions of the three modes of material nature.