Catechism of the Catholic Church
2337 - Chastity means the successful integration of sexuality within the person and thus the inner unity of man in his bodily and spiritual being. Sexuality, in which man's belonging to the bodily and biological world is expressed, becomes personal and truly human when it is integrated into the relationship of one person to another, in the complete and lifelong mutual gift of a man and a woman.
Nine Points to Obtain Chastity
by Father Andrew Apostoli
1 - Avoid occasions of sin. An occasion of sin is any person, place or thing that usually leads one into serious sin.
2 - Look at your life and how this sin affects you negatively.
3 - Make a good confession.
4 - Ask the Lord to give you the grace to change. Chastity is a grace of God.
5 - Pray the Rosary daily.
6 - Perform daily acts of self-denial to strengthen your will. Also, the more we deny ourselves, the more generously we give to Christ.
7 - Get your mind off yourself. If your world is centred around you, it will be difficult to break the habit. But if you think about others, it will be easier.
8 - Find the joy of doing something for someone else such as volunteering at a soup kitchen.
9 - Get connected with good people such as an adult Christian group.