תניא ב"ש אומריםג' כתות הן ליום הדיןאחת של צדיקים גמורין ואחת של רשעים גמורין ואחת של בינונייםצדיקים גמורין נכתבין ונחתמין לאלתר לחיי עולם רשעים גמורין נכתבין ונחתמין לאלתר לגיהנם שנאמר (דניאל יב, ב) ורבים מישני אדמת עפר יקיצו אלה לחיי עולם ואלה לחרפות לדראון עולם בינוניים יורדין לגיהנם
Beit Shammai (in a baraita) says: There will be three groups of people on the great Day of Judgement: One of wholly righteous people, one of wholly wicked people, and one of middling people. Wholly righteous people will immediately be written and sealed for eternal life. Wholly wicked people will immediately be written and sealed for Gehenna, as it is stated: “And many of those who sleep in the dust of the earth shall wake, some to eternal life and some to shame and everlasting contempt.” (Daniel 12:2). Middling people will descend to Gehenna to be cleansed and to achieve atonement for their sins,
ומצפצפין ועולין שנאמר (זכריה יג, ט) והבאתי את השלישית באש וצרפתים כצרוף את הכסף ובחנתים כבחון את הזהב הוא יקרא בשמי ואני אענה אותו ועליהם אמרה חנה(שמואל א ב, ו) יהוה ממית ומחי' מוריד שאול ויעל
and they will cry out in their pain and eventually ascend from there as it is stated: “And I will bring the third part through the fire, and will refine them as silver is refined, and will try them as gold is tried; they shall call my name and I will answer them.” (Zechariah 13:9). This is referring to the members of the third group, who requires cleansing. And about them, Hannah said: “The lord kills, and gives life; he brings down to the grave, and brings up.” (1 Samuel 2:6)
ליום הדין. כשיחיו המתים כדמוכח קרא ואע"פ שכבר נדונו אחר מיתתן בגן עדן או בגיהנם מפני הנפש עדיין יהיה דין אחר אם יזכהו לחיי העולם הבא שהוא קיים לעולם ויש שכבר קבלו דינם בגיהנם ומתוך כך שמא יזכו:
The day of Judgment -This is the judgment that occurs when the dead rise, as is apparent from the Pasuk. Even though people were already judged after their death to go to Gan Eden or Gehinnom due to their souls, there is still a judgment whether they will receive Olam Haba which means whether they will live forever. Some of these souls have already received their punishment in Gehinnom, and therefore will possibly merit Olam Haba.
ליום הדין - כשיחיו המתים:
The Day of Judgement - When the dead arise
רשעים גמורים - רובם עונות:
The wholly Evil - Those who have many sins
בינוניים - מחצה על מחצה:
The middling - Half (of good) and half (of bad)
ומצפצפים - צועקים ובוכים מתוך יסורין שעה אחת ועולין:
Crying - Those who cry out from their suffering for one hour and arise
Gehenna is not mentioned in the Torah and in fact does not appear in Jewish texts before the sixth century B.C.E. Nevertheless, some rabbinic texts maintain that God created Gehenna on the second day of Creation (Genesis Rabbah 4:6, 11:9). Other texts claim that Gehenna was part of God's original plan for the universe and was actually created before the Earth (Pesahim 54a; Sifre Deuteronomy 37). The concept of Gehenna was likely inspired by the biblical notion of Sheol.
Who Goes to Gehenna? In rabbinic texts Gehenna played an important role as a place where unrighteous souls were punished. The rabbis believed that anyone who did not live in accordance with the ways of God and Torah would spend time Gehenna. According to the rabbis some of the transgressions that would merit a visit to Gehenna included idolatry (Taanit 5a), incest (Erubin 19a), adultery (Sotah 4b), pride (Avodah Zarah 18b), anger and losing one's temper (Nedarim 22a). Of course, they also believed that anyone who spoke ill of a rabbinic scholar would merit time in Gehenna (Berakhot 19a).
In order to avoid a visit to Gehenna the rabbis recommended that people occupy themselves "with good deeds" (Midrash on Proverbs 17:1). "He who has Torah, good deeds, humility and fear of heaven will be saved from punishment in Gehenna," says Pesikta Rabbati 50:1. In this way the concept of Gehenna was used to encourage people to live good, ethical lives and to study Torah. In the case of transgression, the rabbis prescribed teshuvah (repentance) as the remedy. Indeed, the rabbis taught that a person could repent even at the very gates of Gehenna (Erubin 19a). For the most part the rabbis did not believe souls would be condemned to eternal punishment.
"The punishment of the wicked in Gehenna is twelve months," states Shabbat 33b, while other texts say the time-frame could be anywhere from three to twelve months. Yet there were transgressions that the rabbis felt did merit eternal damnation. These included: heresy, publicly shaming someone, committing adultery with a married woman and rejecting the words of the Torah. However, because the rabbis also believed that one could repent at any time, the belief in eternal damnation was not a predominant one.
OLAM HA-BA (Heb. עוֹלָם הַבָּא). The term olam ha-ba (literally, "the coming world") in contrast to olam ha-zeh (liter-ally "this world") refers to the hereafter, which begins with the termination of man's earthly life. This meaning of the expression is clearly implied in the statement of R. Jacob, quoted in Avot (4:17): "One moment of repentance and good deeds in this world is better than the entire life of the world to come." The earliest source in which the phrase occurs is Enoch 71:15, which is dated by R.H. Charles (Charles, Apocrypha, 2 (1913), 164) between 105 and 64 B.C.E. A synonym frequently used in place of "the world to come" is atid lavo ("What is to come" or "the future") as in Tosefta Arakhin 2:7. Often also "the days of the Messiah" are contrasted with the life of this world. An example is the comment by the colleagues of Ben Zoma (1:5) on the phrase "all the days of thy life" (Deut. 16:3) that it includes in addition to this world the era of the Messiah.