Romans 4:5 says, "To the one who does not work but believes in Him who justifies the ungodly, his faith is counted as righteousness."
Justification by faith alone is the gospel, the belief that we are forgiven our sins and made innocent before God by the atoning blood of Jesus Christ and His resurrection from the grave. You can do nothing to earn this. It is by the grace of God.
"For all have sinned and fall short of the glory of God, and are justified by His grace as a gift, through the redemption that is in Christ Jesus, whom God put forward as a propitiation by His blood, to be received by faith." Romans 3:23-25Whoever teaches that salvation is a combination of faith and works is teaching a different gospel. The Catholic and Orthodox churches both deny justification by faith alone. Salvation is by faith and the Eucharist, or by faith and baptism. That's a different gospel.
"If anyone saith, that by faith alone the impious is justified; in such wise to mean, that nothing else is required to co-operate in order to the obtaining the grace of Justification... let him be anathema." Council of Trent, Canon 9Galatians 1:8-9 says that anyone who preaches a different gospel is accursed. Galatians 2:16 says, "We know that a person is not justified by works of the law but through faith in Jesus Christ, so we also have believed in Christ Jesus, in order to be justified by faith in Christ and not by works of the law, because by works of the law no one will be justified."
"The sacraments of baptism and the Eucharist are decisive to salvation... What is the event at which salvation truly takes hold? Baptism!" Fr. Theodore Stylianopoulos, Greek Orthodox Archdiocese of America
Now when a person has been saved, they confirm their faith by obedience. If they do not obey the commands of Christ, they're still dead in their sins. This is what James meant when he said faith without works is a dead faith (James 2:26).
"Whoever says 'I know Him' but does not keep His commandments is a liar, and the truth is not in him, but whoever keeps His word, in him the love of God is perfected. By this we may know that we are in Him: whoever says he abides in Him ought to walk in the same way in which He walked." 1 John 2:4-6Someone might say, "Well, what about faith. Isn't that something that I do?" Nope. Because as you study the doctrine you will find that even faith itself is also a gift from God.
"For by grace you have been saved through faith. And this is not your own doing; it is the gift of God, not a result of works, so that no one may boast." Ephesians 2:8-9As Romans 5:1-2 says, "Therefore, since we have been justified by faith, we have peace with God through our Lord Jesus Christ. Through Him we have also obtained access by faith into this grace in which we stand, and we rejoice in hope of the glory of God," when we understand the text.