The belief in purgatory is not shared by all Christian denominations. Some Protestant denominations, such as Lutherans, Anglicans, and Methodists, reject the concept of purgatory and believe that souls either go directly to heaven or hell after death.
The notion of purgatory is based on the idea of the particular judgment, which holds that each soul undergoes a judgment immediately after death to determine their eternal destiny. If the soul is deemed to be in a state of grace but still in need of purification, they are believed to enter purgatory.
The concept of purgatory is often associated with the idea of penance and prayer. Catholics believe that prayers, masses, and indulgences can help shorten the time souls spend in purgatory. The feast of All Souls' Day, celebrated on November 2, is a day when Catholics particularly pray for the souls in purgatory.
It's important to note that the concept of purgatory is not explicitly stated in the Bible. Instead, it is based on theological interpretations of certain biblical passages, combined with traditions and teachings that have developed over time within the Catholic Church.