Purgatory is, in Roman Catholic teaching, a state of purification after death. It is for people who die in God’s grace but are not yet ready to enter God’s presence. They are considered certain of salvation. Purgatory prepares them for heaven; it does not decide whether they will be saved. The Bible does not teach it: the blood of Jesus cleanses believers from all sin (1 John 1:7; Hebrews 10:14), and those who die in the Lord rest from their labors (Revelation 14:13).
See Intermediate State.