[12] Therefore, my beloved, as you have always obeyed, so now, not only as in my presence but much more in my absence, work out your own salvation with fear and trembling;
[13] for God is at work in you, both to will and to work for his good pleasure. Phil 2:12-13 RSV
(1)
Philippians 1:4 "For your fellowship in the gospel from the first day until now;"
Philippians 2:12 "Wherefore, my beloved, as ye have always obeyed,..."
From the time Paul first took the gospel to Philippi and made the first Christians there until some years later when Paul wrote the Philippian epistle, they had faithfully remained in the gospel, had continued to obey.
They would work out their salvation by their continued faithfulness in remaining in the gospel, by their continued obedience to the gospel, obey the commands of Christ as found in the NT letters... "And if any man obeyeth not our word by this epistle, note that man, that ye have no company with him, to the end that he may be ashamed." 2 Thess 3:14. They would be doctrinally sound by doing so, Philippians 1:27.
(2)
The phrase "work out" means to complete, to continue until finished. They were not to stop this work until completion, until the goal was reached. It is a life long work until death, be thou faithful unto death, Revelation 2:10. Therefore a man has a role in his own salvation and not 100% passive.
An analogy:
"(ii) There is another side to this. Salvation is of man. "Work out your own salvation," Paul demands. Without man's co-operation, even God is helpless. The fact is that any gift or any benefit has to be received. A man may be ill and the doctor able to prescribe the drugs that will cure him; but the man will not be cured until he takes them and he may stubbornly refuse all persuasion to take them. It is so with salvation. The offer of God is there; without it there can be no such thing as salvation. But no man can ever receive salvation unless he answers God's appeal and takes what he offers....It is never God who withholds salvation (2 Pet 3:9); it is always man who deprives himself of it (Acts 13:46)” ”
William Barclay's Daily Bible Study
(3)
Paul said to "work out" not "work for" for salvation cannot be earned or merited. Working out one's salvation in obeying Christ's NT until death is a necessary condition God has placed upon His free gift of salvation. Noah's work in building the ark was a necessary, conditional work in the saving of his house and earned him nothing. "So likewise ye, when ye shall have done all those things which are commanded you, say, We are unprofitable servants: we have done that which was our duty to do.: Luke 17:10