This excerpt from Vatican II’s Dogmatic Constitution on the Church, Lumen Gentium, paragraph 25, explains the authority of the Magisterium or Apostolic teaching authority of the Church and the way in which Catholics are bound to submit to that authority.
Among the principal duties of bishops the preaching of the Gospel occupies an eminent place. For bishops are preachers of the faith, who lead new disciples to Christ, and they are authentic teachers, that is, teachers endowed with the authority of Christ, who preach to the people committed to them the faith they must believe and put into practice, and by the light of the Holy Spirit illustrate that faith. They bring forth from the treasury of Revelation new things and old, making it bear fruit and vigilantly warding off any errors that threaten their flock. Bishops, teaching in communion with the Roman Pontiff, are to be respected by all as witnesses to divine and Catholic truth. In matters of faith and morals, the bishops speak in the name of Christ and the faithful are to accept their teaching and adhere to it with a religious assent. This religious submission of mind and will must be shown in a special way to the authentic magisterium of the Roman Pontiff, even when he is not speaking ex cathedra; that is, it must be shown in such a way that his supreme magisterium is acknowledged with reverence, the judgments made by him are sincerely adhered to, according to his manifest mind and will. His mind and will in the matter may be known either from the character of the documents, from his frequent repetition of the same doctrine, or from his manner of speaking.
Although the individual bishops do not enjoy the prerogative of infallibility, they nevertheless proclaim Christ’s doctrine infallibly whenever, even though dispersed through the world, but still maintaining the bond of communion among themselves and with the successor of Peter, and authentically teaching matters of faith and morals, they are in agreement on one position as definitively to be held. This is even more clearly verified when, gathered together in an ecumenical council, they are teachers and judges of faith and morals for the universal Church, whose definitions must be adhered to with the submission of faith.
And this infallibility with which the Divine Redeemer willed His Church to be endowed in defining doctrine of faith and morals, extends as far as the deposit of Revelation extends, which must be religiously guarded and faithfully expounded. And this is the infallibility which the Roman Pontiff, the head of the college of bishops, enjoys in virtue of his office, when, as the supreme shepherd and teacher of all the faithful, who confirms his brethren in their faith, by a definitive act he proclaims a doctrine of faith or morals. And therefore his definitions, of themselves, and not from the consent of the Church, are justly styled irreformable, since they are pronounced with the assistance of the Holy Spirit, promised to him in blessed Peter, and therefore they need no approval of others, nor do they allow an appeal to any other judgment. For then the Roman Pontiff is not pronouncing judgment as a private person, but as the supreme teacher of the universal Church, in whom the charism of infallibility of the Church itself is individually present, he is expounding or defending a doctrine of Catholic faith. The infallibility promised to the Church resides also in the body of Bishops, when that body exercises the supreme magisterium with the successor of Peter. To these definitions the assent of the Church can never be wanting, on account of the activity of that same Holy Spirit, by which the whole flock of Christ is preserved and progresses in unity of faith.
But when either the Roman Pontiff or the Body of Bishops together with him defines a judgment, they pronounce it in accordance with Revelation itself, which all are obliged to abide by and be in conformity with, that is, the Revelation which as written or orally handed down is transmitted in its entirety through the legitimate succession of bishops and especially in care of the Roman Pontiff himself, and which under the guiding light of the Spirit of truth is religiously preserved and faithfully expounded in the Church. The Roman Pontiff and the bishops, in view of their office and the importance of the matter, by fitting means diligently strive to inquire properly into that revelation and to give apt expression to its contents; but a new public revelation they do not accept as pertaining to the divine deposit of faith.