I am now confused. It would appear to me that the Catholic Church is the people in it, and you say they decide what is a heresy. But you earlier said that a heresy was a teaching contrary to divine revelation, which somehow exists and isn't determined by humans. The conundrum for me is that these appear to be be two sides of the same coin. One side - divine revelation, other side - not divine revelation so heretical. If people determine what is heretical, they have equally decided what is divine revelation. Is there a way of resolving this that might make sense?
I can but try, but these aren't exactly the easiest questions you're asking ...
First, the Revelation is actually transcendental, and it resides with God.
It has simply been transmitted to mankind, through the Prophets, the Apostles, and some of the Saints, and through Christ, and the guardianship of this Revelation has been placed with the Church, by Christ.
ALL of the core dogmata of the Faith are of divine origin, whether by the revelations to Moses and the other Patriarchs and Prophets, through Christ Himself, through His direct teaching to the Apostles, or through a small number of additional revelations given to various Church Fathers and Saints and others. This is called the "
revealed theology", and with some minor (but very problematic) exceptions, it forms the core beliefs of the Christian Faith in general, not just Catholicism ; indeed, much of it is held in common with the Jewish religion too.
But there is a secondary body of teachings, of lesser as well as variable Authority, that have been deduced by logical reasoning as well as
pro et contra debate over the Millennia. These teachings are furthermore informed by the parallel advances in Philosophy, Science, language theory, psychology, etc etc --- as well as by History. This is called the "
natural theology", and much of it is debatable.
So whilst my definition of heresy is accurate -- each individual heresy can be of various different kinds, for various different reasons, depending essentially on the degree of surety that exists in the mind of the Church as to the dogmata or doctrines that it is incompatible with.
The totally indefectible dogmata, such as all men and women are endowed in their nature of their own Free Will ; or Christ is the Son of God ; etc can never be taught against without heresy. There is a second group of infallible doctrines that are derived so unarguably and directly from the Revelation that they also can never be taught against without heresy, such as the doctrine of the Real Presence, the doctrine of baptism, and so on. Things get far more complex when the natural theology is involved though.
The rule of thumb concerning heresies against the revealed theology is twofold. First, any teachings that are in a state of logical incoherence with the Revelation are necessarily heretical, which means that the related logically coherent conclusions that they teach against can be defined as being truths of the Religion. Second though, and just as important -- and this is in my experience
frequently misunderstood -- in any question of doctrine or theology where debate exists between various positions none of which contradict the Revelation nor the revealed theology nor the naturally derived doctrines described hereabove, then it becomes heretical to say that any of these positions is false and wrong, whilst
not being heretical to claim any of them as being true and correct ; because in cases such as these, we simply do not know the answer to the problem, but it remains possible to believe in one particular theory or teaching concerning the problem. The Protestant heresy typically involves the taking of definite positions concerning indefinite teachings, and the declaration that whichever opposing definite positions are "wrong".
If I could try and explain this in a nutshell, the Church is the passive recipient of the Revelation that she has received, whilst being very active in her manner in passing this revelation onwards to mankind.
Finally, there is a group of doctrines that has been decided at a far more disciplinary and/or pastoral level ; including some that are declared as infallible for some such reasons. These teachings are man-made, albeit that they are directed towards the purpose of shared divine worship, and they represent a number of extra requirements to be considered as a Catholic, and to be considered in Full Communion with the Church. On the other hand, there is more than one example of a Saint of the Church excommunicated or otherwise condemned for a heresy of disobedience to such disciplinary or pastoral teachings, as was for example Saint Joan of Arc, and then vindicated either in life or in death by the realisation by the Church that these disciplinary or pastoral teachings or judgments were themselves of a heretical nature.
---
Now, you ask how all of this edifice can hold together -- and the simple answer is that from a strictly mortal point of view, it can't. Our Original Sin as well as our personal failings prevent us implicitly and intrinsically of perfect Faith in the teachings of God through His Church ; but thankfully, we are not alone, nor are we left to our sole devices, which would quickly make a complete mess of things.
An unknowable amount and quantity of personal revelations to Faithful Catholics through the Millennia, whether through the Holy Spirit, through theology, through Apparitions or other forms of messages from God, ensure that the Church in its entirety, which is to say the Communion of all of God's baptised Faithful, is constantly being cared for by God's Perfect Love, steered away from Error and back towards Truth. Without such Graces, we would naturally slide into Error and heresy, because the fullness of the Revelation transcends any individual human comprehension.