Ok, so I’ve been Catholic for a little less than a year so forgive me if I get this wrong.
So before anything God gives us actual grace in which we can respond too or reject. If we respond to it we get faith. By our faith we receive sanctifying Grace through baptism. It is infused on our souls. We are justified (made righteous) before God and we are sanctified (fit to live in heaven) by God. We are made holy. If we fall into mortal sin we loose sanctifying grace and are not justified in the sight of God and aren’t sanctified. Through the sacrament of reconciliation we receive sanctifying grace by our faith. In the sacraments (especially the Eucharist) and in prayer and even in works of mercy, we can increase the sanctifying grace on our souls which will help us resit temptation and help us become more holy and live more of a holy life. Staying in sanctifying grace, and being able to resist temptation more and more. Now, when we receive grace, we respond to it not only by our faith but also by our works. If we loose faith we loose grace, if we don’t do works we also loose grace. Because by doing works it shows we have a live faith, which gets us grace. If no works we loose grace and can’t receive it back unless we decide we ARE going to live the way Jesus did and show we have an active faith. By works we can also receive rewards in heaven. Works also helps build up our faith. If we build up our faith we are going to want to stay in grace more and therefor resist temptation to sin. Therefor, helping in the process of salvation by becoming more holy by resisting sin more and by staying in grace. Works can also get us more actual grace, which can motivate us to go to confession when needed, or at the last second if we’re just about to sin to convince us not too. Actual Grace is not infused on our soul but is rather… imputed? (That’s the best word I can think of) At our deaths if we are in a state of grace we receive final justification and final sanctification. We are righteous before the Lord and can live in heaven.