Catholic teaching says that there are three places the soul can go after death, hell, heaven, and purgatory. This last place is a place for those who do not merit eternal damnation but are not yet pure enough or cleansed enough for the glory, perfection, and absolute joy of heaven.
There, they suffer greatly, but are assured of one day getting to heaven. Purgatory is likened to a prison, and in it souls can no longer pray for or help themselves, but continuously pray for others. God determines the length of time and degree of suffering the souls there experience – some have shorter stays and some longer.
St. Faustina describes Purgatory in her diary:
[The next night] I saw my Guardian Angel, who ordered me to follow him. In a moment I
was in a misty place full of fire in which there was a great crowd of suffering souls. They
were praying fervently, but to no avail, for themselves; only we can come to their aid. The
flames which were burning them did not touch me at all. My Guardian Angel did not leave
me for an instant. I asked these souls what their greatest suffering was. They answered
me in one voice that their greatest torment was longing for God. I saw Our Lady visiting
the souls in Purgatory. The souls call he “The Star of the Sea.” She brings them
refreshment. I wanted to talk with them some more, but my Guardian Angel beckoned
me to leave. We went out of that prison of suffering. [I head an interior voice] which said,
My mercy does not want this, but justice demands it. Since that time, I am in closer
communion with the suffering souls.
The Church also teaches that we can and should help these poor souls who cannot help themselves. We can alleviate their suffering by prayer and sacrifice on their behalf. This pleases God immensely, when we do this act of mercy and charity for the fellow members of the Church suffering.
St. Gertrude’s prayer alone releases from purgatory 1,000 souls when it is said:
Eternal Father, I offer You the most precious blood of thy Divine Son, Jesus, in union with the Masses said throughout the world today, for all the Holy Souls in Purgatory, for sinners everywhere, for sinners in the universal Church, for those in my own home, and in my family. Amen.
There is also a beautiful chaplet for the Holy Souls in Purgatory which can be found here.
A Heroic Act of Charity on Behalf of the Holy Souls can also be made. From Thirty-Day Devotions for the Holy Souls by Susan Tassone pg. 148, the Heroic Act is as follows:
O Holy and Adorable Trinity, desiring to cooperate in the deliverance of the souls in purgatory, and to testify, to my devotion to the Blessed Virgin Mary, I cede and renounce in behalf of the holy souls, all the satisfactory value of all my works during life, and all the suffrages which may be given to me after my death, consigning them entirely into the hands of the Blessed Virgin, that she may apply them according to her good pleasure to the souls of the faithful departed, whom she desires to deliver from their sufferings. Deign, O my God, to accept and bless this offering which I make to Thee at this moment. Amen.
This offering is giving all our works of satisfaction or good works during life, and those made on our behalf after our death into the hands of the Blessed Mother to be used to pay the debt of the souls in Purgatory, or to alleviate their sufferings or free them. This Act gives one a greater degree of Glory in Heaven for all of eternity.
The Princess of God is charitable and thoughtful to the souls in Purgatory, following after the Saints in this and she can avoid purgatory for herself as well, in a number of ways or by practicing a number of devotions, which can be found here.