The Catholic Church does not teach that we earn our salvation by our own efforts, although it does teach that we have to work on our salvation.
"Work out your own salvation with fear and trembling" (Phil. 2:12).
We can do nothing to merit the grace that comes to us in baptism, which is the normal beginning of the Christian life.
Justification comes by faith. Only it says that it doesn’t come through faith alone. If you look carefully at Paul’s writings, you will notice that he never says that our righteousness comes from faith alone—only that it comes from faith apart from works.
Romans 3:28 is a key verse in the differences between traditional Protestants and Catholics. Paul says a man is justified by faith (pistei in Greek). When Martin Luther translated the letter to the Romans into German in the sixteenth century, he added the word alone —but alone is not in the original Greek text. The phrase "faith alone" does occur in the New Testament: one time, in James 2:24. There the inspired apostle denies that justification is from faith alone.
"You see that a man is justified by works and not by faith alone."
Sometimes Paul expands his phrase from works by adding the phrase of the law, as in Romans 3:20 and 28 and Galatians 2:16.
Sometimes Paul substitutes the phrase through the law to describe the same reality. In Romans 3:20, he says, "Through the law comes knowledge of sin." When Paul uses the word works he is talking about the Old Testament law.
Galatians will show that Paul is using works of the law to refer especially to the law of circumcision. He says in Galatians 5:2, "Now I, Paul, say to you that if you receive circumcision, Christ will be of no advantage to you." Paul’s opponents in Galatia wanted to bring the Gentile Christians back into the Old Testament law.
These are the works of the law that Paul is fighting against, and they have no place in our justification.
Paul is saying in essence that Gentile Christians do not have to be circumcised and live like Jewish Christians in order to be saved.
Paul speaks about Christians fulfilling the law by following the command to "love your neighbor as yourself" (Gal. 5:14). He then explains that we must show the "fruit of the Spirit" (Gal 5:16–26) and bear one another’s burdens (Gal. 6:1ff) as a way of fulfilling the "law of Christ" (Gal. 6:2). All Paul’s teaching comes down to this: Our own works can never justify us, but works that grow out of faith in Christ are part of our justification. That’s why Paul says in Philippians 2:12 you must "work out your own salvation with fear and trembling." And that squares with James’s teaching that works that grow from faith justify.
Works actually justify.
James did not say explicitly, "You see that faith was active along with his works, and faith was completed by works" (Jas. 2:22). And then in verse 24 James concludes again, "A man is justified by works and not by faith alone."
Salvation is a process of becoming holier and holier through time. All of this is a work of grace that God performs in our hearts through faith. Works done in faith are the natural completion of believing in Christ. As we trust and do God’s work, he instills within us more grace so that we may become holier.