There is definitely some confusion around this phrase. There are some who say the bible contradicts itself in this area because there are some verses that say we are not saved by our works but by the sacrifice God made in his son Jesus and there are other verses that say faith without works is dead.
“8. For it is by grace you have been saved, through faith—and this is not from yourselves, it is the gift of God— 9. not by works, so that no one can boast.”
Ephesians 2:8-9 NIV
“17. In the same way, faith by itself, if it is not accompanied by action, is dead.”
James 2:17 NIV
I think the best way to start to understand this is by examining these parts of scripture separately. Lets start by examining the concept of salvation, which is the roots of our faith. Before Jesus had to die, the people of the earth grew exceedingly wicked with all forms of covetousness and sexual immorality that God knew He would have to sacrifice his only begotten Son Jesus to save us from our condition.
“5. The Lord saw how great the wickedness of the human race had become on the earth, and that every inclination of the thoughts of the human heart was only evil all the time.”
Genesis 6:5 NIV
“10. This is love: not that we loved God, but that he loved us and sent his Son as an atoning sacrifice for our sins.”
1 John 4:10 NIV
You see, when Adam and Eve sinned in the garden, they allowed darkness into their hearts and because of that darkness, we are born with this sinful nature in our hearts.
“6. When the woman saw that the fruit of the tree was good for food and pleasing to the eye, and also desirable for gaining wisdom, she took some and ate it. She also gave some to her husband, who was with her, and he ate it. 7. Then the eyes of both of them were opened, and they realized they were naked; so they sewed fig leaves together and made coverings for themselves.”
Genesis 3:6-7 NIV
It is because of this sinful nature that we all need Christ to enter into the Kingdom of God. This brings me to Romans 10:13, the salvation message. All who call on the name of the Lord will be saved.
13. for, “Everyone who calls on the name of the Lord will be saved.”
Romans 10:13 NIV
So now that we know how we are saved, what must we do to increase our faith and to show others the way? Put our faith into action, that is exactly what James is talking about in James chapter 2. We cannot do this in our own power, this is why we must be baptized in the Holy Spirit. When we receive the Holy Spirit, we now have a helper, one who guides us, and leads us in the truth. He moves on us and in us to carry out His will on earth. God needs us to partner with Him in this.
“6. When Paul placed his hands on them, the Holy Spirit came on them, and they spoke in tongues and prophesied.”
Acts 19:6 NIV
“26. In the same way, the Spirit helps us in our weakness. We do not know what we ought to pray for, but the Spirit himself intercedes for us through wordless groans.”
Romans 8:26
In this, we must allow ourselves to be transformed by the Holy Spirit of which the direct result is righteousness as mentioned in Galatians 5:22-23.
“22. But the fruit of the Spirit is love, joy, peace, forbearance, kindness, goodness, faithfulness, 23. gentleness and self-control. Against such things there is no law.”
Galatians 5:22-23 NIV
I say all this to help you understand that faith and works combine to both help you increase in righteousness and to help you be living proof that God is real and the only way to Him is through His Son Jesus Christ.
6. Jesus answered, “I am the way and the truth and the life. No one comes to the Father except through me. 7. If you really know me, you will know my Father as well. From now on, you do know him and have seen him.”
John 14:6-7 NIV
You can be the person that God destined you to be in your workplace, at home, at church, and out in public. In all that you do, practice righteousness and let the fruits of the Spirit be evident in you for all to see. In this you cannot go wrong. So do all things as if doing them for God and the only ones you can disappoint are those who let wickedness reign in their lives.