T
he teaching of Humanae Vitae in marriage and family life.

Short answer:

Paul VI made clear the role of everyone, God, the Church, the spouses, the doctors and nurses, the scientists, the Public Authorities, in the light of God's loving design for mankind (be fruitful and multiply..., be holy) and in the light of God's laws.
The Church sees sexual activity between spouses as "noble and worthy".
Artificial birth control is against the natural laws and cannot be used. The Church urges couples to follow Natural Family Planning and to have recourse to fertile/infertile periods to become responsible parents.
"For the natural law, too, declares the will of God, and its faithful observance is necessary for men's eternal salvation". (Humanae Vitae.)
"For man cannot attain that true happiness for which he yearns with all the strength of his spirit, unless he keeps the laws which the Most High God has engraved in his very nature." (Humanae Vitae.)

Developed answer:

Historical:
We have to remember the historical context (July 1968) of the promulgation of this Encyclical. At the time when we witnessed "...man's stupendous progress in the domination and rational organization of the forces of nature to the point that he is endeavoring to extend his control over every aspect of his own life-over his body, over his mind and emotions, over his social life, and over the laws that regulate the transmission of life."(H.V.)
The Church had to answer to new questions such as: "Has the time come when the transmission of life should be regulated by their (human) intelligence and will rather than through specific rhythms of their own bodies?"(H.V.)
The use of the “pill” was considered as the answer from science to help the women master their fecundity and get out of the darkness of the middle age.

Teachings:

- Marriage as a Divine Institution.
"Male and Female he created them" Gn 1, 27 "and the two of them became one body." Gn 2, 23.
In Humanae Vitae the Church repeats that marriage is a divine institution and has to follow the rules given by God to attain its fulfillment, its perfection. "...husband and wife, through that mutual gift of themselves, which is specific and exclusive to them alone, develop that union of two persons in which they perfect one another, cooperating with God in the generation and rearing of new lives." (H.V.) Husband and wife are not alone, they cooperate with God. In a Catholic marriage they have received the grace of the sacrament that represents the union of Christ and His Church.
As Christ and the Church, they will become one heart and one soul.
The goals of marriage and conjugal love are conjugal union, procreation and education of children.
"Children are really the supreme gift of marriage..."(H.V.)

- Man cannot do what he wants.
The Church reminds the spouses that they have to be responsible parents, "They are not free to act as they choose in the service of transmitting life." "They are bound to ensure that what they do corresponds to the will of God."(H.V.)
To do so the Church urges the spouses to observe the natural law." God has wisely ordered laws of nature..."(H.V.)

Union and procreation should never be separated: " the fundamental nature of the marital act, while uniting husband and wife in the closest intimacy, also renders them capable of generating new life-and this as a result of laws written into the actual nature of man and woman." (H.V.)
Husband and wife have to understand that they cannot contradict the will of God. God is the source of all life and love, man is only the minister of the design established by God.

Condemnation of contraception, promotion of virtues.

The Church condemns completely all forms of contraception for whatever reason but also proclaims that it is "lawful for married people to take advantage of the infertile period" to space or avoid pregnancies.
Even if the goal is the same, avoid pregnancy, the married couple is right to use a faculty provided to them by nature and according to natural laws. "New life is not the result of each and every act of sexual intercourse". But couples cannot "obstruct the development of the generative process."( by the use of contraception.) (H.V.)
The Church shows the consequences of artificial birth control and the potential drifts. The Church promotes the value of Self-Discipline and Chastity, the recourse to God through prayer and the use of the Sacraments, especially the Eucharist and Reconciliation.

Conclusion.

The Church has the duty to reaffirm the laws of God and to ask the faithful to follow these laws and commandments, but the Church also urges everyone to be Christ-like who "came, not to judge but to save the world". And that "He was bitterly severe toward sin, but patient and abounding in mercy toward sinners." (H.V.)
The Church invites the Bishops to consider the mission "to guide married life to its full human and Christian perfection" as "the most urgent of their responsibilities at the present time". (H.V.)