Since the apostles and their successors were given the power to “bind and loose,” the Church has always understood that there are some aspects of ecclesial life that are not immutable, while also clear that some teachings are eternal and immutable.
The “how” of determining the mutable from the immutable involves Catholic Dogmatic Theology. Like any field of study, there are levels of certainty of various propositions. In physical science, the highest levels of certainty are called the “laws” of science, (e.g. the law of gravity). Some things are believed to be true with absolute certainty, some with various other levels of certainty based upon a reasonable discernment of the evidence, and some are considered doubtful matters because we simply lack clear evidence.
In Catholic Dogmatic Theology, the living Magisterium discerns that which was taught and handed on to her from the 1st century “deposit of faith” and judges what level of theological certainty exists for various ecclesial teachings.
De fide (“of faith”) teachings “to be believed” (Lat “credenda”) are always immutable, understood to be taught infallibly by the Church, and demand the assent of faith. Obstinate denial or doubt results in heresy, a grave sin against the virtue of faith.
De fide (“of faith”) teachings “to be held” (Lat “tenenda”) are always immutable, understood to be taught infallibly by the Church, and demand the assent of faith. However, they are not formally taught by the Church as “divinely revealed” (but may be so defined later, after much prayerful contemplation of Scripture and Tradition). Obstinate denial or doubt of de fide tenenda is contrary to ecclesial unity or in military terms “good order and conduct,” which is a grave sin against charity and results in lack of “full communion” with the Catholic Church.
Sententia Certa (“certain doctrine”) is held to be binding upon the faithful so long as the magisterium holds it binding by law. However, doctrine that is not deemed by the magisterium as manifestly de fide is not immutable. Doctrines demand the “religious assent” of the faithful. Obstinate refusal to give religious submission is a grave sin which is censurable under canon law. Some doctrinal affirmations of the Church may be binding for a time, but loosed another time, as their may be an admixture of error within such doctrine, which over time becomes more magisterially clarified through prayerful contemplation of the deposit of faith. I really can’t think of doctrine that was binding but later loosed excepting perhaps the doctrine regarding the immovable earth back in Galileo’s day, but there’s some uncertainty as to whether that was an exercise of magisterial authority or judicial (disciplinary) authority. Nonetheless, sententia certa is not, theologically speaking, immutable in the eyes of the Church, but the weight of tradition gives it ecclesial certainty sufficient to bind the faithful toward religious assent.
Theological speculation and/or “common teaching” (sententia communis) are both part of “free opinion” which has no binding quality by canon law.
There are other levels or “theological notes” within Catholic Dogmatic theology, but the above is a broad breakdown.
Lastly, ecclesial discipline is infallible in the indirect and negative sense. That is, while not immutable, the general discipline of the universal Church can never be considered harmful or dangerous to the faithful. Pius VI condemned the contrary proposition. Nonetheless, such discipline may not always be prudent or “fitting” for contemporary times, so disciplinary norms are always changeable by lawful ecclesial authorities, depending upon the contemporary circumstances.
The three “D’s” are binding upon all Catholics: Dogma, Doctrine and Discipline. Only de fide tenenda and de fide credenda are infallible and immutable.
For an introduction to Catholic Dogmatic Theology, see here:
Introduction to Catholic dogmatic theology
For a non-exhaustive listing of the de fide dogmas and certain doctrines of Catholicism, see here:
Catholic Dogmas and Doctrine