The tendenscy to commit sin (Concupiscence) is a result of the stain of original sin–man’s fallen nature. It is because of this fallen nature that we need salvation in the person of Christ. We are not capable of meriting heaven on our own. We need His gift of grace.
As for that salvation, the Catholic understanding is that it is not won until we have reached heaven.
You may have heard of the concept of the 7 deadly sins: Lust, gluttony, greed, sloth, wrath, envy, and pride. This list is not about specific sins so much as it is about things in our lives that can cause us to commit sin. If we allow one or more of the 7 deadlies to come to dominate our thoughts, our attitude, our decisions, our actions, we will tend to commit more and more (and often increasingly serious) sins.
What you may not have heard of are the 7 virtues. Each deadly sin has an opposite virtue: Chastity, temperance, charity, diligence, patience,. kindness, and humility. These are principles by which if we put to practice in our lives, we can reduce our tendency to commit sin.
In Catholic teaching, it is understood that grace is a free gift of God, not something we can merit. However, it is not without strings attached. You will find no concept of “once saved, always saved” in the Catechism of the Catholic Church. We are expected to respond to God’s gift of grace by making every effort to shun our sinful nature and practice virtue. Some effective ways of doing that are the spiritual and corporal works of mercy, for example. When we fail and fall into sin again, as we all do, we are expected to repent and try again to purge sin from our lives.
While we do not achieve perfection in this life, we are to strive to do so with all our might. If we die in a state of grace (as opposed to a state of unrepented mortal sin), whatever impurities we were unable to purge ourselves of in this life will be purged in purgatory before we enter heaven. No impure or imperfect thing may enter heaven. Therefore Purgatory is a place of grace where we are so perfected–the refining fire, if you will.