There are three types of Karmas.: Sanchita, Prarabdha and Vartaman. Sanchita Karma is all the Karma done in previous birthbirths. Prarabdha Karma is part of the Sanchita Karma that is ripe and is going to yield fruit in this birth. The Vartaman Karma is the Karma that we do in this birth.
Vyāsa said — O King! Hear, then the causes that are certainly very wonderful. The seers say that Karma is of three kinds — Sañchita (accumulated), Vartamāna (present) and Prārabdha (commenced). Each of these is again subdivided into three, Sāttvik, Rājasik, and Tāmasik. The accumulated effects of Karmas done in many past lives is called Sañchita, O King! The effects of this Sānchita Karma, be it auspicious or inauspicious, be it for a long or for a short time, must have to be enjoyed by the beings whether they be good or bad. This Sañchita Karma done by the embodied beings in several previous births, can never be totally exhausted even in hundred Koti Kalpas without their being enjoyed. The Karma that is being done by a Jīva and that has not as yet been completed, that is called Vartamāna Karma. The Jīvas do this Vartamāna Karma, auspicious or inauspicious, in their present embodiments. At the time of birth, a part of the Sañchita Karma, the soul takes up for fructification. This part of Sañchita Karma is called Prārabdha Karma. - Srimad Devi Bhagavatam 6.10.6-29
It is the Prarabdha Karma that gets attached to the Linga Deha (subtle body).
At the expiry of the above period in Heaven or Hell, when there comes the time of his assuming another body, the Jīva becomes conscious of the subtle body (Linga Deha) and takes his birth again. When the Linga Deha comes into existence, the part of the Karma done in various previous births that are ripe and ready to yield their fruits, gets attached to the Jīva by God (or Destiny). - Srimad Devi Bhagavatam 4.21.24-25
References -