Each person has a soul. This soul remains in the body until death. At death, the soul is met by two angels. One is the Angel of Death, the other, His assistant (Surah 6:61, Noble Edition; Gospel of Barnabas). The angels take the now conscious soul to a journey into the heavens.
Opinions vary as to what happens next. The soul is taken to this intermediate state. It is said the righteous do not suffer but it is necessary their souls are purified in the fire. The unrighteous have their souls purged.
From the Jewish Encyclopedia:
PURGATORY:This intermediate state is found in the New Testament in the story of Lazarus and the Rich man (Luke 16:19-31). Lazarus has his soul carried away by angels and taken to an unpleasant place because he was unrighteous on the earth. This is the intermediate state. The Roman Catholic church merely adopted a Jewish belief. Religious Jews say a kaddish prayer for the dead for about 12 months to help release the soul from purgatory. The sufferings we endure in this world help atone for sins (Gospel of Barnabas). The more we suffer here the less we suffer in purgatory or in the Day of Judgement.
An intermediate state through which souls are to pass in order to be purified from sin before they are admitted into the heavenly paradise. The belief in purgatory, fundamental with the Roman Catholic Church, is based by the Church authorities chiefly upon II Macc. xii. 44-45: "If he [Judas] had not hoped that they that were slain should have risen again it had been superfluous and vain to pray for the (dead. . . . Whereupon he made an atonement that they might be delivered from sin"; for this indicates that souls after death pass through an intermediate state in which they may by some intercession be saved from doom. The same view, that an atonement should be made for the dead, is expressed in Sifre, Deut. 210. The idea of an intermediate state of the soul, release from which may be obtained by intercession of the saints, is clearly dwelt upon in the Testament of Abraham, Recension A, xiv., where the description is given of a soul which, because its good and its evil deeds are equal, has to undergo the process of purification while remaining in a middle state, and on whose behalf Abraham intercedes, the angels joining him in his prayer, whereupon the soul is admitted into paradise.
The view of purgatory is still more clearly expressed in rabbinical passages, as in the teaching of the Shammaites: "In the last judgment day there shall be three classes of souls: the righteous shall at once be written down for the life everlasting; the wicked, for Gehenna; but those whose virtues and sins counterbalance one another shall go down to Gehenna and float up and down until they rise purified; for of them it is said: 'I will bring the third part into the fire and refine them as silver is refined, and try them as gold is tried' [Zech. xiii. 9.]; also, 'He [the Lord] bringeth down to Sheol and bringeth up again'" (I Sam. ii. 6). The Hillelites seem to have had no purgatory; for they said: "He who is 'plenteous in mercy' [Ex. xxxiv. 6.] inclines the balance toward mercy, and consequently the intermediates do not descend into Gehenna" (Tosef., Sanh. xiii. 3; R. H. 16b; Bacher, "Ag. Tan." i. 18). Still they also speak of an intermediate state.
Regarding the time which purgatory lasts, the accepted opinion of R. Akiba is twelve months; according to R. Johanan b. Nuri, it is only forty-nine days. Both opinions are based upon Isa. lxvi. 23-24: "From one new moon to another and from one Sabbath to another shall all flesh come to worship before Me, and they shall go forth and look upon the carcasses of the men that have transgressed against Me; for their worm shall not die, neither shall their fire be quenched"; the former interpreting the words "from one new moon to another" to signify all the months of a year; the latter interpreting the words "from one Sabbath to another," in accordance with Lev. xxiii. 15-16, to signify seven weeks. During the twelve months, declares the baraita (Tosef., Sanh. xiii. 4-5; R. H. 16b), the souls of the wicked are judged, and after these twelve months are over they are consumed and transformed into ashes under the feet of the righteous (according to Mal. iii. 21 [A. V. iv. 3]), whereas the great seducers and blasphemers are to undergo eternal tortures in Gehenna without cessation (according to Isa. lxvi. 24).
The righteous, however, and, according to some, also the sinners among the people of Israel for whom Abraham intercedes because they bear the Abrahamic sign of the covenant are not harmed by the fire of Gehenna even when they are required to pass through the intermediate state of purgatory ('Er. 19b; Ḥag. 27a).
Those who profess there is no purgatory or eternal souls have to answer some interesting questions. They have to explain away Lazarus and the Rich man. They also have to explain how such beliefs first came into existence. Lastly contend with the Prophet called Muhammed, who spoke in favour of God's Sabbath in five Surah's, proclaiming the conscious existence of the soul in various Surah's. Muhammed ascended into seven heavens and seeing heavenly things. The same cannot be said of many proponents of soul sleep. They confuse the physical body which rests at death with the soul.
Lastly they have to contend with Muhammed's words that the Jews have not given mankind a full record of scripture. Much of what God gave to them was deliberately concealed from the common people and through secret lodges given to only a few. "...Who then sent down the Book which Moses brought, a light and a guidance to mankind which you (the Jews) have made into separate papersheets, disclosing (some of it) and concealing much." (Surah 6:91).
Judaism understands this concept. They clearly call it the "oral" law or "tradition" later given to Moses. Some say the "kabbalah". Much of this was never given to the common people with a revision given in the Old Testament (removing esoteric concepts). Thus relegating Judaism to a physical religion void of anything spiritual. The Christian argument now claims the New Testament was to bring the "spiritual" element taken out from the Old Testament. However, the Quran is our correcting scripture. It is given to correct and update our understanding. Maybe we should be paying it more attention.