The Basics of Judaism: Messiah and the Next World (including Reward & Punishment): What Happens after Death?:
What happens after a person dies?
The soul is believed to stay near the body for a few days after death, and then go to the next world to be judged. After death the soul returns to G-d (Koheles 12:7). When Samuel tells Saul "Tomorrow you and your sons will be with me" (1 Samuel 28:9), he means "with me
in heaven". On the punishment of the wicked in hell see Isaiah 66:24, who speaks of "the fires that are not extinguished". Some time in the future, when this world comes to an end, the bodies of all the good people who ever lived will be physically resurrected, their physical defects will be corrected, and their souls will be put back into their bodies, after which they will live forever.
Ask a follow-up question