Sanctifying grace is the deifying effect of God's all-holy presence in a person's soul. A soul in the supernatural state of sanctifying grace is a temple of God. God's presence in the soul causes sanctifying grace much like electricity in a light bulb causes light. The Trinity acting collectively produces this supernatural quality in a soul, as St. Thomas Aquinas teaches: "[T]he effect of grace is also from the Father, Who dwells in us by grace, just as the Son and the Holy Ghost."
God divinizes a person's soul by imparting to it the quality of His holiness, comparable to how electricity powers a light bulb. This is why sanctifying grace is called "deifying grace" in paragraph 1999 of the Catechism of the Catholic Church (CCC). Sanctifying grace is called "habitual grace" by the CCC in paragraph 2000 because it's an abiding or permanent supernatural quality or disposition of soul gained by baptism and lost only by mortal sin. A soul in the state of sanctifying grace is no longer in the state of either original or mortal sin.
It's also called justifying grace, as it restores a person to God's friendship, either from original sin by baptism or from mortal sin by confession. It makes a person an adopted child of God and an heir of Heaven. By it a soul is said to be justified and made righteous because the soul then shares in the justice of God, which removes all personal guilt.
Sanctifying grace transfigures the soul with God's divine beauty. The more intensely a soul shines with the light of sanctifying grace, the more it heats up with the infused theological and moral virtues. The CCC in paragraph 2023 teaches, therefore, that sanctifying grace is infused into the soul "to heal it of sin" by helping it to overcome the sinful effects remaining from original sin and the sinful tendencies of vice acquired by repeated personal sins.
Discover how God's presence sanctifies a person's soul in season one of Church Militant's Premium show Armor of God—The Holy Spirit and Sanctifying Grace.