Catechism of the Catholic Church
1853 - Sins can be distinguished according to their objects, as can every human act; or according to the virtues they oppose, by excess or defect; or according to the commandments they violate. They can also be classed according to whether they concern God, neighbor, or oneself; they can be divided into spiritual and carnal sins, or again as sins in thought, word, deed, or omission. The root of sin is in the heart of man, in his free will, according to the teaching of the Lord: "For out of the heart come evil thoughts, murder, adultery, fornication, theft, false witness, slander. These are what defile a man."128 But in the heart also resides charity, the source of the good and pure works, which sin wounds.
128 - Mt 15:19-20
That sin may be committed not only by outward deeds but also by the inner activity of the mind apart from any external manifestation, is plain from the precept of the Decalogue: "Thou shalt not covet", and from Christ's rebuke of the scribes and pharisees whom he likens to "whited sepulchres... full of all filthiness" (Mat 23:27). Hence the Council of Trent (Sess. XIV, c. v), in declaring that all mortal sins must be confessed, makes special mention of those that are most secret and that violate only the last two precepts of the Decalogue, adding that they "sometimes more grievously wound the soul and are more dangerous than sins which are openly committed". Three kinds of internal sin are usually distinguished:
1 -The pleasure taken in a sinful thought or imagination even without desiring it.
2 - Dwelling with complacency on sins already committed.
3 - The desire for what is sinful. That is, one that includes the deliberate intention to realize or gratify the desire, has the same malice, mortal or venial, as the action which it has in view.