Today is All Souls Day, the commemoration of all the faithful departed (souls in purgatory). Yesterday was all Saints Day honoring the Saints in heaven who intercede for us before the throne of God. Only the souls of those who were perfected on earth can go straight to heaven. The souls of those who have not been perfected on earth (and not damned to hell) must be perfected in a state of afterlife called Purgatory. Only after the souls in Purgatory are completely purged of imperfections due to sin and the attachment to sin, can they enter into heaven. It says in the book of Revelation that nothing unclean can enter heaven. It is reasonable then, to believe that God Who is All-Merciful has provided a state of final purification after death.
Our prayers can expedite the process of purification and alleviate the suffering that a soul in purgatory must undergo. It is a suffering of desire to be with God, a desire that cannot be fulfilled until the purification is over. These souls cannot pray for themselves for the purification process to go quicker so they rely on the prayers of their loved ones and just about anyone else who prays for them Here on earth.
The souls in purgatory are classified as the Church Suffering, the souls in heaven make up the Church Triumphant and all of us still fighting here on earth comprise the Church Militant. The three groups constitute what is referred to as the Communion of Saints.
We the members of the Church Militant, have a duty to pray for the Church Suffering. And we ought to imitate and pray to the members of the Church Triumphant so that we can become Saints bypassing purgatory altogether by being purged here on earth through acceptance of the suffering of daily life.