At the moment, we live in the Pre-Messianic Era. One who has complete faith in the Torah (bible) knows that Mashiach (the messiah) can come at any given moment and will bring all of the Jewish nation to Israel, and restore the traditions of old during the times of the Beit Hamikdash (the Holy Temple). There are many allusions to Mashiach in the Tanach (all of the scriptures classified with the bible) that describe the coming of Mashiach, and there are many texts written by commentators of the Tanach and Great Rabbis.
There are two ways that Mashiach will come:
a) We bring him- If the Jewish Nation as a whole is at a high enough spiritual level, Mashiach will come and not delay. Bringing Mashiach early through our mitzvot or good deeds is certainly possible, but this is not an easy task. Some people say that every good deed that we do adds a piece to the Third Beit Hamikdash, or the Third Holy Temple, and every sin that we do takes away a piece from the Third Beit Hamikdash. If we bring Mashiach with our great spirituality and our mitzvot, the events leading up to the coming of Mashiach will be miraculous, and G-d's hand will be evident in this scenario.
b) The Default- We live in the year of 5775 according to the Jewish calendar. If the Jewish calendar reaches the year of 6000 and Mashiach has not come yet, he will come automatically. If we don't end up bringing Mashiach by the year of 6000 with great spirituality and good deeds, the events leading up to the coming of Mashiach will seem natural and the hand of G-d will not seem as obvious.
When will Mashiach come?
Mashiach by default will come by the year of 6000. The current year is 5775, which means that worst case scenario, Mashiach will automatically come in 225 years. The occurrence of an extremely terrible event can be an indicator of the arrival of Mashiach. According to Rabbi Aryeh Kaplan, two indications of the beginning of the Messianic Era are sociological revolutions, and when the world gets the power to destroy itself. With all of the nuclear weapons that are being made and stored, for years, the world has had the power to destroy itself, which means that Mashiach can come at any moment. Before Mashiach comes, there will be a huge wave of Atheism and children will rebel against their elders. The Jews will break into groups, and it will be hard to tell which group is legitimate. "Truth will fail" (Isaiah 59:15). Lots of people will leave Judaism and only the wise and faithful will remain Jewish (Daniel 12:10). People who return to Judaism after leaving in order to save themselves will be punished. Before peace and prosperity and the age of Mashiach, there will be one final battle, the battle of Gog and Magog. The Rabbis don't know much about the battle of Gog and Magog, whether or not Gog and Magog are people, or nations, but they do know that they will try to destroy the Jewish people and their connection with G-d. Whether or not this battle will be physical or spiritual is unknown. In this battle, a descendant of Joseph, the Mashiach Ben Yosef will emerge and lead the Jews to defeating Gog and Magog. The legend is that the Mashiach Ben Yosef will die in this battle and that the Jewish people will mourn for him like a man would over the death of his first born son. Some opinions say that the Mashiach Ben Yosef does not have to die in this war, and that afterward, he will serve as a second in command to the Mashiach Ben David, and finally unite the twelve tribes. The battle of Gog and Magog is the final battle between good and evil, ending all conflict in the world. After the war, Eliyahu (Elijah the Prophet) will lead the world to G-d in peace. Eliyahu will be the Cohen Hagadol (the Holy Priest) in the Third Beit Hamikdash.
a) We bring him- If the Jewish Nation as a whole is at a high enough spiritual level, Mashiach will come and not delay. Bringing Mashiach early through our mitzvot or good deeds is certainly possible, but this is not an easy task. Some people say that every good deed that we do adds a piece to the Third Beit Hamikdash, or the Third Holy Temple, and every sin that we do takes away a piece from the Third Beit Hamikdash. If we bring Mashiach with our great spirituality and our mitzvot, the events leading up to the coming of Mashiach will be miraculous, and G-d's hand will be evident in this scenario.
b) The Default- We live in the year of 5775 according to the Jewish calendar. If the Jewish calendar reaches the year of 6000 and Mashiach has not come yet, he will come automatically. If we don't end up bringing Mashiach by the year of 6000 with great spirituality and good deeds, the events leading up to the coming of Mashiach will seem natural and the hand of G-d will not seem as obvious.
When will Mashiach come?
Mashiach by default will come by the year of 6000. The current year is 5775, which means that worst case scenario, Mashiach will automatically come in 225 years. The occurrence of an extremely terrible event can be an indicator of the arrival of Mashiach. According to Rabbi Aryeh Kaplan, two indications of the beginning of the Messianic Era are sociological revolutions, and when the world gets the power to destroy itself. With all of the nuclear weapons that are being made and stored, for years, the world has had the power to destroy itself, which means that Mashiach can come at any moment. Before Mashiach comes, there will be a huge wave of Atheism and children will rebel against their elders. The Jews will break into groups, and it will be hard to tell which group is legitimate. "Truth will fail" (Isaiah 59:15). Lots of people will leave Judaism and only the wise and faithful will remain Jewish (Daniel 12:10). People who return to Judaism after leaving in order to save themselves will be punished. Before peace and prosperity and the age of Mashiach, there will be one final battle, the battle of Gog and Magog. The Rabbis don't know much about the battle of Gog and Magog, whether or not Gog and Magog are people, or nations, but they do know that they will try to destroy the Jewish people and their connection with G-d. Whether or not this battle will be physical or spiritual is unknown. In this battle, a descendant of Joseph, the Mashiach Ben Yosef will emerge and lead the Jews to defeating Gog and Magog. The legend is that the Mashiach Ben Yosef will die in this battle and that the Jewish people will mourn for him like a man would over the death of his first born son. Some opinions say that the Mashiach Ben Yosef does not have to die in this war, and that afterward, he will serve as a second in command to the Mashiach Ben David, and finally unite the twelve tribes. The battle of Gog and Magog is the final battle between good and evil, ending all conflict in the world. After the war, Eliyahu (Elijah the Prophet) will lead the world to G-d in peace. Eliyahu will be the Cohen Hagadol (the Holy Priest) in the Third Beit Hamikdash.