You are getting closer.
The Scriptures tell us nothing impure may enter heaven. Jesus taught about God’s love being like a refiners fire. Other teachings of Jesus that come to us from the Apostles in the Epistles and the Apocolypse speak of our responsibility for our sins. From the days of the Apostles, Christians have believed that God will purify us before we enter into heaven. That is what Puragtory is, a state of purification before someone enters into heaven.
In this life it is hard for us to conceive of a state where there is no time, and as we do not know how the cleansing takes place, we use examples of cleansing, as did Jesus, which we can understand. We know that there is no physical fire in purgatory, because it is a place where the soul, and not the body is purified. However we do sometimes read it as being a place where (spiritual) fire is used to purify us. We also read that God’s love is like a white hot flame, so intense and powerful that it purifies all that it makes contact with. All these are used to explain to us by anology the concepts of what it is like outside of time and space.