The central belief of Zoroastrianism is that God, Ahura Mazda (The Wise Lord), is all good and he created the world which is therefore also good. All misery, disease, suffering and death are the assault of the evil one, Angra Mainyu. The history of the world is the arena for the conflict of good and evil.
Ahura Mazda appeared to the prophet Zoroaster (dated somewhere 1500-1200 BCE) in visions and taught him that the good religion of Zoroastrianism will ultimately overcome evil.
All people have free will but after death their good thoughts, words and deeds will be weighed; if the good outweighs the evil then the individual will pass safely across the bridge of judgment (the Chinvat Bridge) to dwell in heaven. However, if the evil overshadows the good, the soul will fall into hell where it will be punished according to its sins. This is not however, the final judgment, as at the end of history (frashegird) a saviour (Soshyant) will come. At this time, evil forces will be destroyed and everyone will be raised from the dead to face a second judgment.
The first judgement was clearly one of the soul because the body can be seen to remain on earth. But Ahura Mazda created both body and soul so after the resurrection everyone will be judged again for their deeds in the body and will return to heaven or hell for appropriate reward and punishment. Once wholly purified, all human beings will go to heaven to dwell with God for eternity.