The third state of a person's soul after death is a state of instruction. This state is for people who are entering heaven and becoming angels, but not for people who are entering hell, since they cannot be taught. As a result, their second state is also their third, concluding with their complete turning toward their own love, and therefore toward the hellish community that is involved in a like love.
When this has been accomplished, they intend and think from this love, and since the love is hellish, they intend nothing that is not evil and think nothing that is not false. There are their delights because they belong to their love. In consequence, they spurn anything good and true that they have adopted earlier because it was a useful tool for their love.
Good people, however, are brought through the second state into a third, a state of their preparation for heaven by means of instruction. For no one can be prepared for heaven except by means of insight into what is true and good - only, that is, by means of instruction. This is because people cannot know what is good and true on the spiritual level, or what is evil and false, unless they are taught. In the world, it is possible to know what is good and true on a civic and moral level, what is called fair and honest, because there are civil laws which teach what is false. There are also social contexts in which a person learns to live by moral laws, all of which deal with what is honest and right. But what is good and true on the spiritual level - this is not learned from the world, but from heaven.
Unless people realize and recognize these facts, they cannot think spiritually. Without thought about these matters, they cannot intend them; for if one does not know something, one cannot think about it, and if one does not think about it, one cannot intend it.
When a person does intend these things, then, heaven flows in; that is, the Lord's life flows into the person's life through heaven. For the divine essence flows into intention, through that into thought, and through these into life, these two being the source of a person's life.
We can see from these considerations, that there is no learning of what is good and true on the spiritual level from the world, but rather from heaven; and we can see that no one can be prepared for heaven except by being taught.
To these places, the Lord brings the good spirits who are to be taught, after their second state in the world of spirits has been completed. This, however, does not apply to everyone, because people who have been taught in the world have already been prepared there for heaven by the Lord, and are brought into heaven by another route. Some are brought in immediately after death.
Once spirits have been prepared for heaven by teaching given in the places mentioned above (this takes a short time only, since the spirits are involved in spiritual concepts which take in many elements at the same time), they are dressed in angelic clothes, most of which are white, as though made of linen. So dressed, they are brought to a path that heads up toward heaven and are committed to angel guardians there. Then they are accepted by some other angels and introduced into communities, and there into many forms of happiness.