Answer:
The basic Catholic teaching is that there is no salvation outside the Church. The Church here being the one that Christ Himself founded and which over the centuries has come to be identified as the "Catholic" Church.
What is contingent for salvation then is initiation into the Catholic Church. This is properly done through the sacrament of baptism. Baptism places a permanent character on the soul, forever identifying it as Christian. Baptism also effaces the mark of Original Sin on the soul and all actual sins the person many have committed as well as all the temporal punishment due for them. If a person would die after being baptized, they would go straight to heaven.
Once baptized a person must continue to grow and deepen their Faith in order to arrive at death in a good disposition. Christ, therefore, gave His Church other sacraments, teachings and powers in order that its members could be strengthened in the Christian life and live lives pleasing to God. At death, a soul must be in the state of grace, that is, have no major unconfessed sin upon the soul and thus be in peace and union with God. To be sure to die in such a good way, daily perseverance in Christian virtue and living is deemed necessary. This is the function of the Church in the life of a Catholic, for It provides the means and encouragement by which to correctly stay the course.
I MUST CORRECT THE FIRST STATEMENT HERE - Yes, The Church does believe there is osalvation "outside the Catholic Church" - Jesus is the key to salvation... He purchased our salvation..... I agree with the rest above... The Church does not teach that we "earn" salvation.... as Jesus earned it for us..