Alma 40:11 - 40:15
Alma 40: 11 Now, concerning the state of the soul between death and the resurrection—Behold, it has been made known unto me by an angel, that the spirits of all men, as soon as they are departed from this mortal body, yea, the spirits of all men, whether they be good or evil, are taken home to that God who gave them life.
Alma has learned from a divine messenger that all men when they die, that their spirits leave their bodies and they then return to the God that gave them the chance at mortality.
Alma 40: 12 And then shall it come to pass, that the spirits of those who are righteous are received into a state of happiness, which is called paradise, a state of rest, a state of peace, where they shall rest from all their troubles and from all care, and sorrow.
Now for those who were righteous in mortality are allowed to go to paradise where they are happy and now enjoy a time of rest and peace of mind freed from the problems of wickedness and sorrow that we all experience in mortality.
Alma 40: 13 And then shall it come to pass, that the spirits of the wicked, yea, who are evil—for behold, they have no part nor portion of the Spirit of the Lord; for behold, they chose evil works rather than good; therefore the spirit of the devil did enter into them, and take possession of their house—and these shall be cast out into outer darkness; there shall be weeping, and wailing, and gnashing of teeth, and this because of their own iniquity, being led captive by the will of the devil.
The wicked, of course, do not get to enjoy this same state. Since they chose to do evil and their works were evil, they go where the spirit of the Lord is not present. Here they will be reminded constantly of their evil deeds and they will experience nothing but a guilty conscious and deep remorse for all their evil acts. The devil was their god so they can experience what is means to be one of his followers.
If you read some of the experiences of those who have had near death experiences and went to hell for a short time because they were not very nice people in life, you get a glimpse of what spirit prison is really like. I definitely do not want to go there.
Alma 40: 14 Now this is the state of the souls of the wicked, yea, in darkness, and a state of awful, fearful looking for the fiery indignation of the wrath of God upon them; thus they remain in this state, as well as the righteous in paradise, until the time of their resurrection.
So this spirit realm, the righteous are in paradise and the wicked are in spirit prison looking forward with great fear of heart for the reward they will receive because of their evil acts in life. This will be the condition of all of us until we are resurrected.
Alma 40: 15 Now, there are some that have understood that this state of happiness and this state of misery of the soul, before the resurrection, was a first resurrection. Yea, I admit it may be termed a resurrection, the raising of the spirit or the soul and their consignation to happiness or misery, according to the words which have been spoken.
Many have labeled our spirits leaving our bodies at death as the first resurrection. It is a logical assumption to label it so being that we receive a judgement as to which part of the spirit world to go to whether paradise or spirit prison.