Here is one of Chabads discussions of the concept of Gilgul, or reincarnation of souls:
http://mobile.chabad.org/m/article_cdo/aid/361889
Reincarnation
One of life’s greatest challenges is to understand “why?”
Often when faced with crisis, trauma, or bereavement, we intuitively search for meaning and purpose. Cold realization that we may never fathom circumstance leaves us numb.
One avenue in which Kabbalah refreshes our faith is in its presentation of reincarnation and soul migration. Although no overt reference is made in the scripture to the subject, however the greatest Kabbalists—notably the Arizal as quoted in the work Shaar HaGilgulim (Gate of Reincarnation), expound clearly its principles.
The soul is eternal, a spark of the Divine, or as the prophet Job calls it “a part of G-d above.” The soul exists before it enters the body and it lives after the body is laid to rest. Though the soul’s place of origin is in the higher worlds, there is something that the soul can achieve in a body that it cannot achieve in the heavenly realms. It has already been explained that the purpose of creation is to make an abode for the Divine in this world. Although higher worlds are glorious in terms of revelation and offer the best reward for a soul after it has achieved its earthly mission, the heavenly realms are not the purpose of creation. It was G-d’s desire to create a world where His presence would be acutely concealed and darkness and evil would prevail. He charged his children with the task of creating a home in this world, and the soul fulfills that mission by its adherence to Torah and Mitzvot.
Kabbalah explains that the soul is comprised of 613 channels, which parallel the 248 limbs and 365 blood Vessels of the body. These 613 channels attain eternal elevation when all 613 Mitzvot are fulfilled by a soul in its earthly descent.
Usually a soul does not manage to fulfill all the commandments in one descent, and the Arizal writes that every soul must be repeatedly reincarnated until it has fulfilled all 613 Mitzvot in thought, speech, and action. In the previous chapter, the notion of purification through Gehinom was introduced.
Here the soul is cleansed in order to be elevated to the Garden of Eden. How is this concept reconciled with the possibility of reincarnation and a return to our world? The Kabbalists explain that when a soul returns to this world, the part of the soul that was elevated by its Torah learning and Mitzvah performance is not reincarnated, rather it is only the other parts of the soul that were not affected by the first incarnation that return. The possibility of a soul being divided and part of a soul being reincarnated is discussed at length in Kabbalah. The original idea stems from the fact that the soul of Adam was composed of all future souls, and the soul of Jacob was comprised of 70 parts which were then further subdivided into the 600,000 souls of Israel. These 600,000 were then subdivided further into another 600,000. Through various reincarnations all parts of the soul are elevated and once the entire soul has been elevated the soul is no longer reincarnated. This explains the strange phenomena of why certain people engage in a specific Mitzvah in which they excel. It could be that the person’s soul descended again for sake of that specific Mitzvah.
Souls may also be reincarnated to complete a certain task, repay a debt, or rectify a sin. In fact the concept of reincarnation as rectification for sin is well documented by the Kabbalists.
Most fascinating is the study of soul migration, which is how a soul from a previous generation is reincarnated in a later generation into a specific set of circumstances which are tailored to engineer a rectification of a previous sin. Of the hundreds of examples, we shall quote one here which is documented in the book Shaarei Teshuvah (Gates of Repentance), written by Rabbi Dovber of Lubavitch, a foremost Kabbalist and chassidic Rebbe. When we take a look at the period in history of the expulsion of the Jews from Spain in 1492, we stand perplexed as to why that generation had the awesome task of deciding between apostasy and burning at the stake. Why was it at this particular junction of Jewish history, Jews had to endure such horrible torture and exile at the hands of the Inquisition?
Rabbi Dovber writes the following:
In the times of the first Temple, they served G-d and did not cast from themselves the yolk of heaven, except in certain idolatrous practices for which they had tremendous desire, so much so that there were only left 7,000 people that had not succumbed to Baal worship in the days of Ahab. All the Kings who served these idols were great men, and they were tainted with this heinous sin of idolatry. All these generations, who were most elevated souls, did not receive their rectification and elevation until the times of the philosophers in the time of Rashi and the Rambam until the time of the Arizal, which was from the year 4856 (1096) in the days of Rashi until the expulsion of Jews from Portugal in the year 5252 (1492), and until the time of the Arizal in 5333 (1573). The Arizal explicitly stated that in his time, the period of destruction that had swept the Jewish world for the last nearly 500 years had ended. All those who had sacrificed their lives in sanctification of G-d’s name in their thousands, and tens of thousands in each generation, all of them were souls of the first Temple. Their sin was that they had previously served idols and had nourished the Kelipot and therefore their rectification was to give up their lives in sanctification of G-d’s name with simple faith which transcended any logic or philosophy.
Imagine a soul that entered the heavenly realms in the days of the first Temple that had been tainted by the grave sin of idolatry. The soul would greatly anticipate and appreciate an opportunity to descend once again to rectify its mistake. Any momentary pain involved, including the murderous moment of being burned alive is worth it to gain eternal elevation. Hence the soul descended to a body in a later generation for rectification.
Although the body of the Spanish Jew could not comprehend why he was being hauled through this torture, what was happening was essentially a kindness for it was the key to eternal elevation. In fact, the Kabbalists point out that the Hebrew word for “reincarnation”—Gilgul—has the same “numerical value” (gematria) as the word Chessed—“kindness.” Such presentations however have their limitations. Could one explain the Holocaust with reincarnation? The Lubavitcher Rebbe was of the opinion that although the concept of reincarnation may be a component in explaining the events of the Holocaust, one could not possibly think of such a hideous crime that would warrant such atrocities. It would be arrogant even to suggest a reason for such merciless extermination and brutality. Rather, one must take the humble position that such tragedy is beyond us. In the words of the prophet, “My ways are not your ways and My thoughts are not your thoughts says G-d.”
Though not all sufferings can be explained by reincarnation, there may however, be help in explaining tragedies such as the deaths of people taken suddenly in accidents, illness, or war. It could be that their souls needed to return to this world for a certain amount of time in order to fulfill a certain purpose, and when that purpose had been achieved, the soul could return to its eternal abode. This may also give comfort to some couples who are devastated by infertility. It could be that a couple has already fulfilled the Mitzvah of procreation in a previous incarnation, and is therefore not required to have a birth child to fulfill the Mitzvah. It must however be noted that calculations of reincarnation should never deter one from doing all that is necessary within the parameters of Jewish law to procreate.
“The hidden matters are for G-d, and the revealed aspects for us and our children.” One should walk simply before G-d, and it is beyond the vision of mere mortals to figure out whose reincarnation one may be. However, in times of challenge and specifically when we feel out of control, it is good to know that all has been meticulously planned and executed in the Divine kaleidoscope.
A Final Comforting Word:
There is a verse in the book of Samuel: “For die we must, like water flows on the ground and that cannot be gathered up again; and G-d favors not a soul, but He devises means that he that is banished be not cast away from Him” (Samuel 2:14). Citing the closing phrase of this verse as an assurance that no one banished from G-d by his sins will remain banished, Rabbi Schneur Zalman writes that every Jew will eventually return to G-d, either in this incarnation or another.