Free will on earth allows you to choose where your soul will spend its immortality. Death bring an end to physical life, but not spiritual life. The New Testament affirms that each person will be rewarded immediately after death in accordance with the life they have lived on earth. For example, the way you lived your life on earth will decide the destiny of the soul, which will be different for some than for others.
Each person therefore receives their eternal reward or retribution (punishment for wrongdoing) of their immortal soul at the moment of death, either by entrance to Heaven or they must go through a period of purification before entering Heaven, which is called Purgatory. The alternative to eternal life is eternal damnation (CCC 1021-1022).
The Holy Souls in Purgatory then are the souls of those who have died but still need purification and sins atoned for; through God's Divine Mercy they are assured of eternal salvation but need to undergo a period of purification that will allow them to attain the perfection needed to enter into eternal life with God. (CCC 1030).