The transgression of a divine law in a grievous matter with full knowledge and consent.
The matter may be serious either in itself (as blasphemy) or because of the circumstances (as striking one's father or mother) or on account of its purpose (as telling a lie in order to destroy a person's character). Sufficient knowledge of the serious nature of a sinful action is present if one is clearly conscious that the act is mortally sinful, say because the Scriptures or the Church identify certain acts as seriously offensive to God. It is enough that one knows that what one intends to do may be a mortal sin, but does it anyhow. Indifference to the laws of God is equivalent to disobeying them.
Full consent is present when one freely wills to commit an action although one clearly knows it is gravely sinful. No sin is committed if one does not will the deed, no matter how clear one's knowledge may be. After all, the essence of sin is in the free will. Thus, too, a person does not sin who, with the best of will, cannot dispel obscene or blasphemous thoughts and desires, even though he or she well knows they are gravely sinful. The resolution to perform an action is not the same as the pleasure or satisfaction experienced in the emotions, nor the same as a compulsive idea, "I like the sin." One sign of partial knowledge or not full consent would be the fact that a person does not complete an action when this can easily be done, or is so minded that the person would rather die than commit a grave sin.