1. Male and female he created them…
God's call to men and women to “be fruitful and multiply" should be understood from the perspective of our creation “in the image and likeness" of God (cf. Catechism 2331, 2334). This entails that human procreation, in the wider context of our sexuality, cannot be “something simply biological, but concerns the innermost being of the human person as such" (Catechism 2361), and so is essentially distinct from animal life.
God is love (1 Jn 4:8), and his love is fruitful. He wants human beings to share in this fecundity, by linking the procreation of each new person with a specific act of love between a man and a woman.  Therefore “sex is not a shameful thing; it is a divine gift, ordained to life, to love, to fruitfulness." 
Since a human being is an individual consisting of a body and a soul, the loving procreative act calls for the participation of all dimensions of the human person—body, feelings, spirit. 
Original sin broke the harmony within each person and with other men and women. This rupture had a special repercussion on the capacity to live our sexuality in accord with human reason. It obscured the inseparable bond between the affective and procreative dimensions of the conjugal act, and made it more difficult for the will to exercise control over the affective and bodily forces of sexuality.
In these circumstances, the struggle for purification and growth in maturity that our sexuality requires does not imply any rejection or negative consideration of this gift that men and women have received from God. Rather it entails the need to “heal it and restore its true grandeur."  The virtue of chastity plays a key role here.
2. Vocation to chastity
The Catechism of the Catholic Church speaks of a “vocation to chastity" because this virtue is a condition and essential part of our vocation to love—the gift of self to which God calls every man and woman. Chastity makes it possible to love in and through our bodies.  In a certain way, it could be said that chastity is the virtue that enables a human person to live well, with benevolence and interior peace in relation to other men and women and to oneself, because human sexuality influences all our capacities from the most physical and material to the most spiritual, giving a masculine or feminine tint to all our faculties.
Thus the virtue of chastity is not simply a remedy against the disorder sin gives rise to in human sexuality, but a joyful affirmation, since it enables us to love God and, through him, other men and women, with our whole heart, our whole soul, our whole mind and our whole strength (cf. Mt 12:30). 
“The virtue of chastity comes under the cardinal virtue of temperance , which seeks to permeate the passions and appetites of the senses with reason" (Catechism 2341). “Chastity means the successful integration of sexuality within the person and thus the inner unity of man in his bodily and spiritual being" (Catechism 2337).
When speaking about chastity, especially with young people, it is important to stress the capacity to love that this virtue imparts to sexuality and procreation. Otherwise, chastity could come to be seen as a negative virtue, since a good part of the struggle to live chastity involves the struggle to control one's passions, which at times can be directed towards a particular good that cannot be rationally ordered to the good of the person as a whole. 
In his present state, man cannot live in accord with the natural moral law, and hence be chaste, without the help of grace. This does not imply the impossibility of acquiring the human virtue that brings a certain control over one's passions, but rather that the wound caused by sin is so deep that only divine help can bring about a perfect reintegration of the human person. 
3. Educating for chastity
Chastity is aimed at attaining control of one's concupiscence, an important part of self-mastery. Attaining this control is a task that lasts for one's whole life and that calls for repeated efforts, which can be particularly demanding at certain periods. Chastity should always keep growing with the grace of God and each one's personal ascetical struggle (cf. Catechism 2342). 
“Charity is the form of all the virtues. Under its influence, chastity appears as a school of the gift of the person. Self-mastery is ordered to the gift of self" (Catechism 2346).
Educating for chastity is much more than what some reductively call “sex education," usually limited to giving information on the physiological aspects of human reproduction and methods of contraception. A true education in chastity involves much more than the biological aspects. It needs to provide help in reflecting on the personal and moral values involved in the issues of human life and personal maturity. Moreover, it needs to foster high ideals of love for God and other men and women, through virtues such as generosity, self-giving, the modesty that protects intimacy, etc. —virtues that help a person to overcome selfishness and the temptation to become self-centered.
Parents have a great responsibility in this task, since they are the first and principal teachers in instilling the virtue of chastity in their children. 
In the struggle to live this virtue, the following means are important:
a) prayer: asking God for the virtue of holy purity;  frequenting the sacraments, which are the “medicine" for our weakness;
b) working intensely, avoiding idleness;
c) moderation in food and drink;
d) caring for details of decency and modesty in dress, etc.;
e) avoiding unsuitable books, magazines and newspapers, and immoral shows;
f) being very sincere in spiritual direction;
g) not thinking about oneself;
h) having a deep devotion to Mary Most Holy, Mater pulchrae dilectionis.
Chastity, while an eminently personal virtue, “involves a cultural effort " ( Catechism 2344), since there is “an interdependence between personal betterment and the improvement of society."  Respect for the rights of the person requires respect for chastity, and particularly the right “to receive information and an education that respect the moral and spiritual dimensions of human life" (Catechism 2344). 
The specific manifestations of this virtue will differ depending on one's vocation. “Married people are called to live conjugal chastity; others practice chastity in continence" (Catechism 2349).
4. Chastity in marriage
Sexual union “is ordered to the conjugal love of man and woman" (Catechism 2360); “it is realized in a truly human way only if it is an integral part of the love by which a man and a woman commit themselves totally to one another until death." 
The grandeur of the act whereby man and woman cooperate freely with God's creative action requires certain strict moral conditions, precisely because of its deep human meaning: the capacity to engender a new human life called to eternal happiness. This is why one should never voluntarily separate the unitive and procreative dimensions of this act, as happens with contraception. 
Chaste couples will find the most adequate moments to live this bodily union so that in each act it always reflects the gift of self it signifies. 
Unlike the procreative dimension, which can be realized in a truly human way only through the conjugal act, the unitive and affective dimension proper to this act can and should be manifested in many other ways. Hence, if for reasons of health or other reasons, the spouses cannot carry out the conjugal union, or if they decide that it is preferable to abstain temporarily (or permanently in particularly serious situations) from the conjugal act, they can and should continue making this gift of self a reality, which fosters the growth of a truly personal love.
5. Chastity in celibacy
God calls some people to live their vocation to love in a special way, in apostolic celibacy.  Living the Christian vocation in apostolic celibacy requires continence.  Excluding the use of one's reproductive capacity in no way entails excluding love or affection.  On the contrary, freely giving to God the possibility of a married life enables one to love and to give oneself to many other men and women, helping them in turn to find God, which is the reason for their celibacy. 
This way of life must always be viewed and lived as a gift, since no one can attribute to himself or herself the capacity to be faithful to God in this path of life without the help of grace.
6. Sins against chastity
Opposed to chastity is lust, a “disordered desire for or inordinate enjoyment of sexual pleasure. Sexual pleasure is morally disordered when sought for itself, isolated from its procreative and unitive purposes" (Catechism 2351).
Since sexuality is a central dimension in human life, sins against chastity are always materially grave and as such entail losing the inheritance of the Kingdom of God (cf. Eph 5:5). However they can be venial when full awareness or perfect consent is lacking.
The vice of lust has numerous serious consequences: mental blindness, which obscures our final end and our good; weakening of the will, which is made almost incapable of any effort, becoming passive, indifferent to work, to serving others, etc.; attachment to earthly goods and forgetting eternal goods; and finally it can even lead to hatred for God, seen by a lustful person as the major obstacle to satisfying his sensuality.
Masturbation is the “deliberate stimulation of the genital organs in order to derive sexual pleasure" ( Catechism 2352). “Both the Magisterium of the Church in the course of a constant tradition, and the moral sense of the faithful have been in no doubt and have firmly maintained that masturbation is an intrinsically and gravely disordered action."  By its very nature, masturbation contradicts the Christian sense of sexuality as being at the service of love. Being a solitary and selfish exercise of sexuality, deprived of the truth of love, it leaves a person unsatisfied and leads to emptiness and regret.
“Fornication is carnal union between an unmarried man and an unmarried woman. It is gravely contrary to the dignity of persons and of human sexuality which is naturally ordered to the good of spouses and the generation and education of children. Moreover, it is a grave scandal when there is corruption of the young" ( Catechism 2353). 
Adultery “refers to marital infidelity. When two partners, of whom at least one is married to another party, have sexual relations—even transient ones—they commit adultery" (Catechism 2380). 
Also opposed to chastity are conversations, looks, manifestations of affection for another person, including fiancés, prompted by a lewd desire or constituting a near occasion of sin which is sought or not rejected.  Pornography —displaying the human body as a mere object of concupiscence—and prostitution —making one's own body an object for financial gain and for carnal pleasure—are grave faults of sexual disorder which, besides offending the dignity of any person involved, are a true social scourge (cf. Catechism 2355).
“ Rape is the forcible violation of the sexual intimacy of another person. It does injury to justice and charity. Rape deeply wounds the respect, freedom, and physical and moral integrity to which every person has a right. It causes grave damage that can mark the victim for life. It is always an intrinsically evil act. Graver still is the rape of children committed by parents (incest) or those responsible for the education of the children entrusted to them" (Catechism 2356).
“Homosexual acts are intrinsically disordered," as the tradition of the Church has always declared.  This clear moral evaluation of acts must in no way prejudge those persons who have homosexual tendencies,  since not infrequently their condition involves a difficult trial.  Furthermore, these persons “are called to chastity. By the virtues of self-mastery that teach them inner freedom, at times by the support of disinterested friendship, by prayer and sacramental grace, they can and should gradually and resolutely approach Christian perfection" ( Catechism 2359).
Catechism of the Catholic Church , 2331-2400.
Benedict XVI, Enc. Deus caritas est , 25 December 2005, 1-18.
John Paul II, Apost. Ex. Familiaris consortio , 22 November 1981.
St Josemaria, “For They Shall See God," in Friends of God: Homilies , 175-189; “Marriage, a Christian Vocation," in Christ is Passing By , 22-30.
Congregation for the Doctrine of the Faith, Decl. Persona humana , 29 December 1975.
Congregation for Catholic Education, Educational orientations on human love , 1 November 1983.
 “Each of the two sexes is an image of the power and tenderness of God, with equal dignity though in a different way. The union of man and woman in marriage is a way of imitating in the flesh the Creator's generosity and fecundity: 'Therefore a man leaves his father and his mother and cleaves to his wife, and they become one flesh' ( Gen 2:24) All human generations proceed from this union. (cf. Gen 4:1-2, 25-26; 5:1)" ( Catechism , 2335).
 St Josemaria, Christ is Passing By , 24.
 “Should he aspire to be pure spirit and to reject the flesh as pertaining to his animal nature alone, then spirit and body would both lose their dignity. On the other hand, should he deny the spirit and consider matter, the body, as the only reality, he would likewise lose his greatness" (Benedict XVI, Enc. Deus caritas est , 25 December 2005, 5)
 Ibid .
 “God is love and in himself He lives a mystery of personal loving communion. Creating the human race in his own image … God inscribed in the humanity of man and woman the vocation, and thus the capacity and responsibility, of love and communion" (John Paul II, Apost. Ex. Familiaris consortio , 22 November 1981, 11).
 “Chastity is the joyous affirmation of someone who knows how to live self-giving, free from any form of self-centred slavery" (Pontifical Council for the Family, The Truth and Meaning of Human Sexuality, 8 December 1995, 17). “Purity is a consequence of the love that prompts us to commit to Christ our soul and body, our faculties and senses. It is not something negative; it is a joyful affirmation" (St Josemaria, Christ is Passing By , 5).
 “Chastity includes an apprenticeship in self-mastery which is a training in human freedom. The alternative is clear: either man governs his passions and finds peace, or he lets himself be dominated by them and becomes unhappy (cf. Sir 1:22). 'Man's dignity therefore requires him to act out of conscious and free choice, as moved and drawn in a personal way from within, and not by blind impulses in himself or by mere external constraint. Man gains such dignity when, ridding himself of all slavery to the passions, he presses forward to his goal by freely choosing what is good and, by his diligence and skill, effectively secures for himself the means suited to this end' ( Gaudium et spes , 17)" ( Catechism 2339).
 “Chastity is a moral virtue. It is also a gift from God, a grace , a fruit of spiritual effort. (cf. Gal 5:22). The Holy Spirit enables one whom the water of Baptism has regenerated to imitate the purity of Christ (cf. 1 Jn 3:3)" ( Catechism 2345).
 Personal maturity includes self-mastery, which requires modesty and temperance, as well as respect for, and being open to, others (cf. Congregation for Catholic Education, Educational orientations on human love , 1 November 1983, 35).
 This aspect of education is of greater importance now than in the past because today's society provides many negative models in this areas (cf. Pontifical Council for the Family, The Truth and Meaning of Human Sexuality, 8 December 1995, 47). “Faced with a culture that largely reduces human sexuality to the level of something commonplace, since it interprets and lives it in a reductive and impoverished way by linking it solely with the body and with selfish pleasure, the educational service of parents must aim firmly at a training in the area of sex that is truly and fully personal" (John Paul II, Familiaris consortio , 37).
 “Holy purity is granted by God when it is asked for with humility" (St Josemaria, The Way , 118).
 Vatican Council II, Const. Gaudium et spes , 25.
 John Paul II spoke about the need to foster a genuine “human ecology" in the sense of achieving a healthy moral environment that will facilitate the human development of the person (cf., for example, Enc. Centesimus annus, 1 May 1991, 38). Part of the “cultural effort" mentioned above consists in making clear the need to respect certain moral norms in the media, especially in television, to safeguard the dignity of the human person. “In these times of violence and of brutal, savage sexuality, we have to be rebels: we refuse point blank to go with the tide, and become beasts. We want to behave like children of God, like men and women who are on intimate terms with their Father, who is in Heaven and who wants to be very close to—inside!—each one of us" (St Josemaria, The Forge , 15).
 John Paul II, Familiaris consortio , 11.
 Also in artificial fertilization there is a rupture between these two dimensions proper to human sexuality, as the Instruction Donum vitae (1987) makes clear.
 As the Catechism of the Catholic Church teaches, the pleasure accompanying conjugal union is something good and desired by God (cf. Catechism 2362).
 Although the measure of sanctity is the love one has for God and not one's state in life, whether celibate or married, the Church teaches that celibacy for the Kingdom of Heaven is a gift superior to matrimony (cf. Council of Trent : DZ 1810; 1 Cor 7:38).
 We will not say anything specific here about priestly celibacy or virginity or consecrated celibacy. But from the moral point of view, total continence is required in each of these situations.
 It would not make any sense to maintain that celibacy goes “against nature." The fact that man and woman can complement one another does not mean that they complete one another, because both are complete as human persons.
 When speaking of priestly celibacy (though applicable to all celibacy for the Kingdom of Heaven), Benedict XVI explains that it cannot be understood merely in functional terms because in reality “it represents a special configuration to the style of life of Christ himself" (Benedict XVI, Apost. Ex. Sacramentum caritatis , 24).
 Congregation for the Doctrine of the Faith, Decl. Persona humana , 29 December 1975, 9.
 Free unions or cohabitation without the intention to marry, trial unions when there is an intention to marry and premarital relations all offend the dignity of human sexuality and marriage. “They are contrary to the moral law. The sexual act must take place exclusively within marriage. Outside of marriage it always constitutes a grave sin and excludes one from sacramental communion" ( Catechism 2390). A sincere gift of self, freely made, must be permanent and lasting.
 Christ also condemns the desire to commit adultery (cf. Mt 5:27-28). In the New Testament, adultery is absolutely forbidden (cf. Mt 5:32; 19, 6; Mk 10:11; 1 Cor 6:9-10). The Catechism, when speaking of offenses against marriage, also mentions divorce, polygamy and contraception.
 “Those who are engaged to marry are called to live chastity in continence. They should see in this time of testing a discovery of mutual respect, an apprenticeship in fidelity, and the hope of receiving one another from God. They should reserve for marriage the expressions of affection that belong to married love. They will help each other grow in chastity" ( Catechism 2350).
 Congregation for the Doctrine of the Faith, Decl. Persona humana , 8. Such acts “are contrary to the natural law. They close the sexual act to the gift of life. They do not proceed from a genuine affective and sexual complementarity. Under no circumstances can they be approved" (Catechism 2357).
 Homosexuality designates the condition of those men and women who feel a sexual attraction, whether exclusive or predominant, for persons of the same sex. The possible situations where this can arise are very diverse and as a consequence extreme prudence is required when treating such cases.
 “The number of men and women who have deep-seated homosexual tendencies is not negligible. This inclination, which is objectively disordered, constitutes for most of them a trial. They must be accepted with respect, compassion, and sensitivity. Every sign of unjust discrimination in their regard should be avoided. These persons are called to fulfill God's will in their lives and, if they are Christians, to unite to the sacrifice of the Lord's Cross the difficulties they may encounter from their condition" ( Catechism 2358).