Catholics believe that there is no salvation except through the Catholic Church.
However, that doesn’t mean that all Catholics, for example, are saved.
St. Paul tells us that we must work out our salvation with fear and trembling.
Any baptized Christian (Trinitarian formula) who is not Catholic is still at least partially a member of the Catholic Church (catholic itself means “universal”). Catholicism is the “totality” of Christian teachings; Protestant Christians retain some of the truths found in full in the Catholic church, and thus are what we term “separated brothers and sisters”.
Likewise with our Orthodox brethren–they retain some of the truths found in full in the Catholic Church.
Jews are the “elder brothers” of Christians–in their scripture which Christians preserve as the “old testament” is the sign of their covenant with God and they also retain some of the truths found in full in the Catholic church; thus they too can be “saved through the Catholic church”. Muslims may share some similarities as well.
For those in “good faith” in other religious traditions, such as Hinduism or Buddhism, again just about every religious tradition even if it never heard of or uses the word “Christian” will share some “truth” with the Catholic Church. That is because the Natural Law is written on the hearts of men and women. There are certain truths which are recognized (even if not always followed) by all human beings because humans were created in the image of God and were created by God FOR God–to love Him and to serve Him. Therefore, once again, if a person in “good faith” but possessing no knowledge of Christ still manages to hold fast to partial truth, through the Divine Mercy of God that person may yet be saved “through the Catholic Church”.
Even those who profess no religion and recognize no God may, if invincibly ignorant (incapable of recognizing the truth of Catholicism/ Christianity), still be saved through the Divine Mercy of God as He has permitted “through the Catholic Church”.
Hope that answers your question. To put it simply, Catholics believe that God has willed that all might be saved, that salvation is through the Catholic Church, and that through the Divine Mercy of God all who are saved are saved “through the Catholic Church”.
God bless you.