Purgatory , according to Catholic Church doctrine , is an intermediary state after physical death in which those destined for heaven `` undergo purification , so as to achieve the holiness necessary to enter the joy of heaven '' .
According to the teaching of the Roman Catholic Church , Purgatory is the `` final purification of the elect '' : `` All who die in God 's grace and friendship , but still imperfectly purified , are indeed assured of their eternal salvation ; but after death they undergo purification , so as to achieve the holiness necessary to enter the joy of heaven . '' ''