The Church enjoys the privilege of “indefectibility”; which is to say that it will be protected against a general failure in achieving its mission of bringing souls to God. “Upon this rock (petra) I will build my Church, and the gates of hell shall not prevail against it.” (Matt. 16) “I will be with you all days, even to the consummation of the world.” (Matt. 28) It should be obvious that while the Church will always be available some where in some form, it may not always have the same external appearance, and the rejection of Its message by individuals does not constitute a failure on Its part. To use the modern idiom, our Lord has promised that “the devil will never put the Church completely out of business.”
Note that “indefectibility” refers to the Church as an organization, not to any one individual. It does not imply “impeccability,” or freedom from sin on the part of its leaders — no one denies that bad men have, from time to time, ruled the Church. “Indefectibility” does not imply that Church leaders will always make the right strategic decisions, nor that they will be orthodox in their private beliefs and teaching. Indeed, it is sometimes — not quite jokingly — said that the continued existence of the Church in spite of its leaders is proof of divine protection.
[Fr Brusca]