Sources refer to the Ramchal’s Derech Hashem.
As we have said, only man has been placed on the crossroads of perfection and imperfection with the ability to choose his own path. This choice must be made of a person’s own free will. If God were to compel a person on the path of goodness, that would be God’s doing, not man’s. In such a scenario, God’s purpose in creating the world would not be fulfilled. Mankind has therefore been imbued with free will in the form of a yetzer hara (evil inclination) and a yetzer hatov (good inclination). Therefore, when a person chooses between good and evil, he does so of his own volition. [I, 3.1]
God’s purpose in creation is best accomplished by man being a synthesis of two opposite components: a physical body and a spiritual soul. The nature of the body is to pursue physical things, while the nature of the soul is to pursue the spiritual. In this, the two parts of a person are in constant struggle. When the soul wins, it elevates both itself and the body. When the body wins, it degrades both itself and the soul. [I, 3.2]
God in His goodness decided that man should engage in this struggle for a limited time, at the end of which he would be rewarded according to the degree of perfection he achieved. Man would then enjoy the level he has earned forever. Therefore, man spends a set amount of time engaged in his battle to achieve his highest degree of perfection, after which he enjoys his reward eternally. [I, 3.3]
The period of earning reward and the period of enjoying it are different in that one is limited and the other is unlimited. It follows logically that the experiences of the two periods should likewise be different. When a person is engaged in the struggle for perfection, it makes sense that his environment contain the elements conducive to such a conflict. Therefore, in this life, physical and spiritual elements are in constant battle, and there’s nothing to stop the forces of mundanity from gaining the upper hand. We might think to “stack the deck” in favor of the spiritual but that would not suit God’s purpose of man achieving his own level of perfection.
In the next stage of existence, however, the opposite is appropriate: when it is time to receive one’s reward, it is fitting that the spiritual side dominate and the physical be suppressed. To accommodate this, God created two worlds of different natures. The period of striving for perfection occurs in this world (olam hazeh), while the period for enjoying reward occurs in the Next World (olam haba), each appropriate for its intended purpose. [I, 3.4]
Originally, the physical and the spiritual were on a pretty even playing field in this world. When Adam sinned, he increased the amount of evil in the world and gave the physical a huge advantage. The result is that it’s now much harder to achieve our spiritual perfection as we must first work hard just to get back to what was originally our starting point. [I, 3.8]
We have explained how an individual cannot achieve spiritual perfection in his current, degraded state and must first undergo physical destruction. The same is true of the world. Just as a person must undergo death in order to purify his soul, the world must also be destroyed (in a sense) in order to achieve its perfected state. The Sages taught (Sanhedrin 97a) that the world will endure for 6,000 years, after which it would be desolate for 1,000 years, only to be renewed. There are different opinions as to how literally or how metaphorically we should take this “destruction” of the world. In any case, this scenario refers to what we call techiyas hameisim – the revival of the dead. [I, 3.9] A person’s ultimate reward (assuming he has earned it) awaits for after this revival, when the soul is reunited with a purified body in a renewed world. People will have achieved different levels in this renewed world, depending on their actions in the first life. [I, 3.10]
Since a person must die before undergoing this future revival, the body and soul each require an appropriate resting place for the interim. The body is returned to the ground, where it undergoes the process of decomposition, as per Genesis 3:19, “For dust you are and to dust you shall return.” The soul, however, awaits its reunification with the body in what is called the “olam haneshamos,” the “world of souls.”
Upon death, the soul is separated from the body. The body is interred but the soul goes to the olam haneshamos, where it will enjoy a preliminary reward to the degree that it has earned. Those who have achieved a sufficient degree of spiritual perfection will ultimately move on to the true reward that awaits reunited body and soul in the renewed world. [I, 3.11]
Of course, a soul is a powerful thing with a fairly high degree of intrinsic spiritual perfection. The only thing that keeps it from purifying our mundane physical bodies is that God has decreed that it be prevented from doing so in order that His plan for humanity be achieved. This decree restrains a soul from acting unfettered until it reaches the olam haneshamos. When the soul is reunited with the body in the post-revival world, it will not be returned to its former constrained state. Rather, it will continue to enjoy the freedom it was granted in the world of souls. In the renewed world, the soul will be the stronger component of a person, continuously purifying the body. The body will start out on a higher spiritual level than a person could ever hope to achieve in his first life, and a person will continue to be able to elevate himself in the renewed, post-revival world. [I, 3.13]