When a person dies, he is punished for all of his sins even before entering Purgatory. There are many types of punishment, all of which are called 'gilgulim', through which a person can reincarnate: into domaim [mineral], tzomai'och [vegetation], chai [inanimate], or into midabair [another person]. Just about everyone must undergo these gilgulim.

The reason is because a person cannot receive punishment until he exists physically in a body with a soul, at which time he can bear and feel pain and atone for his sins.1 The extent to which a person sins determines the type of gilgul he will have to undergo, either as something from the tzomai'och [domain], or as chai, etc.

Thus, even righteous people and Torah scholars can reincarnate in this manner for having committed sins in their lifetimes, after which time they will ascend to the level befitting them. The sin must be removed, for G‑d does not disregard [any of them], since He operates according to judgment. Even should the person be completely righteous, He will not accept any 'bribe' from him - even a mitzvah.2

Also, when a person wants to ascend to a higher level he is sent back [to this world] and reincarnates in one of the manners mentioned above, if he still has a particular sin to purge.

Once I was with my teacher and he told me about a certain man he saw from the time of the Tanaim3 who reincarnated into a female goat for having had relations by the light of a candle [which is forbidden by Jewish law (Orach Chayim Tsniyut)]. This can result in children who are epileptic (Nedarim), which it turned out they were, and as a result died young. It was literally considered [that he was guilty of] spilling the blood of his children.

Another time, he told us that he saw a very learned Torah scholar from a previous generation for whom the time had come to ascend to a higher level. Therefore, at that time, he could see him being punished for not having been scrupulous in the finer points of mitzvot, in order for him to ascend to a higher level. According to the level to which a person is to be elevated, that is the extent to which he must be purified - even for the finer details of mitzvot, to a hairsbreadth.

At that time the person was punished for two reasons. Firstly for having become distracted from his tefilin while saying the words, "May it be Your will before You... that we shouldn’t toil for naught and not give birth to confusion" after the kedusha in the prayer, "U'Va LeTziyon". When concentrating on this prayer, he became distracted from his tefilin, and for that slight transgression he was punished.4

Secondly, one Shabbat, [as] he walked in a public domain, some dust gathered on his shoe, and as a result he carried four amot [cubits] unwittingly in a public domain.5

Now you can understand what it means when it says that righteous people have no rest in the world-to-come, as the Sages teach on the verse (Psalms 84:8), "They go from strength to strength" (Berachot 64b) As they ascend from level to level, they need to purge [previous sins] even more.

The positive, deeper meaning is that they are constantly in a state of ascent. A person is connected to G‑d in the next world the same way he is here - just amplified (Zohar). In order to merit proper acceleration and ascent there, one must start by doing it here. And so it is necessary to renew oneself everyday. Start today's quest for enlightenment with new vigor and enthusiasm. This is the key to being constantly fresh. (Likutei Moharan)

[Translation and commentary by Perets Auerbach.]