The Bible seems a bit double minded on the role that works play in a man's salvation. Paul seems to condemn works as a denial of grace, while James indicates that works are necessary. Christians attempt to resolve this issue in various ways.
Some Christians see the attainment of salvation as requiring works, generally some ritualistic acts which bring about God's forgiveness and acceptance. This reliance on works is generally reconciled with the word's of Paul by saying that the required works are acts of obedience and not acts of merit. In other words, the works are required by God but do not earn salvation; they merely allow God to grant unmerited favor.
Other Christians, who ascribe to so called "faith only salvation", believe that salvation is more of a mental assent exercise, devoid altogether of works. As soon as one accepts the validity of the church's gospel message and mentally affirms its efficacy for him or herself, salvation becomes a reality. Often times a mental or audible prayer is thought to be the mark of the salvation moment, the instant in which salvation is granted by God.
One will note that salvation, by anyone's definition, is invisible to the physical eye. It supposedly occurs behind the scenes, in the mind of God really. He is said to change His opinion and reverse His plan for our eternal destiny at the salvation moment. Any confidence in such a salvation remains a matter of faith, faith in the fact that we know how to be saved and that we have properly followed the necessary steps, whatever they are.
Establishing some reasonable measure of confidence in our own salvation is where the rubber hits the road as it relates to salvation and works. How can I know I am safe from God's wrath? The church's response to this question generally starts off by stressing what is necessary to gain salvation in the first place, "what must I do to be saved" (to use the words of the Philippian jailor). If you have done those things then supposedly you can be sure of salvation.
But, then eventually the church has to deal with James when he says "show me your works". Based on the words of James, many believe that a demonstration of certain behaviors (or works) by the saved individual will confirm, after the fact, that he or she has actually been saved, that the salvation process was proper and effective. Thus works ultimately becomes, almost universally, the essential element in salvation for all shades of Christianity.
Either position, salvation by works of obedience or salvation later verified by works, is a shaky proposition at best. In neither case can anyone be certain of their standing before God. It remains a maybe, "hope so" matter of faith with a large measure of doubt. This is the conundrum which has roiled Christianity through the ages, and it will continue to do so as long as salvation remains an unverifiable change in God's attitude toward individuals.