You can only believe in purgatory if you hold a substance dualist view of human beings.
Purgatory is a place that exists according Roman Catholic Theology, and a number of people who are not Roman Catholic believe in it, too. In Catholic theology, it is a place where you go after death if you are not yet ready for heaven, so that you can receive punishments for the venial sins (the less serious sins, as opposed to mortal sins) that have not yet been dealt with in this life. As Thomas Aquinas put it,
[I]f the debt of punishment is not paid in full after the stain of sin has been washed away by contrition, nor again are venial sins always removed when mortal sins are remitted, and if justice demands that sin be set in order by due punishment, it follows that one who after contrition for his fault and after being absolved, dies before making due satisfaction, is punished after this life. Wherefore those who deny Purgatory speak against the justice of God: for which reason such a statement is erroneous and contrary to faith.
Outside of this historical Catholic understanding of purgatory, others have suggested, not that people need to be punished, but rather that they simply need to be fully sanctified (made holy) before reaching their final state in heaven. Jerry Walls defends this view in his book Purgatory: The Logic of Total Transformation. In public conversations, Dr Walls has remarked that while no doubt the sinful human desire is to have total transformation all at once, the reality is that sanctification is a process that takes time, hence purgatory.
I do not believe in purgatory, but I will not here argue that purgatory does not exist. Instead, I will just make one observation: To believe in purgatory presupposes mind-body substance dualism.