The letter/sermon begins by addressing the "saints in Christ Jesus who are at Philip pi." Paul says that God is the one who started the work in Philippi and that God will bring this work to completion when Christ returns (1:6, this verse also gets taken out of context for various purposes). Paul prays for that the church would grow in love with knowledge and discernment and filled with the fruit of righteousness. In his letter/sermon to the Galatians Paul distinguishes between the fruit of the Spirit and the works of the flesh. Fruit naturally springs up out of the Christian because of the work of the Holy Spirit while our old Adam continues to produce the sinful works of the flesh. There are similarities here as well to Jesus' parable of the sheep and the goats. The goats bring their good works before God but are cast away. The sheep didn't even realize that they were doing good works.
Paul then goes on to talk about his imprisonment and the preachers who have appeared at the church of Philippi in his absence (1:14 ff.).. These people are trying to gain financially in Paul's absence. In a very pastoral way Paul directs the Philippians away from trying to determine motivations and instead directs them to examine the message that is preached. If they preach Christ all is well and good but as we find later there are some Judaizers among them trying to preach a works based salvation. These Judaizers seem to be saying that Paul's suffering is the result of his false teaching but Paul says that the Christian life is a life of suffering. He calls the Philippians to remain united and not be divided by the Judaizers. By remaining united in the Gospel they will be sign of the destruction of the Judaizers and a clear sign of their own salvation which is from God and not the result of gaining notoriety among men (1:28-29).
In chapter 2 Paul argues that if the Philippians have faith in Christ and communally participate in the Holy Spirit (most likely a reference to the Eucharist), they should be united in doctrine and love and be serving one another in humility. Let the same mind be in them that was also in Christ. They are to share the same way of thinking that Christ had when He emptied Himself and took the form of a servant even though He is God. Christ did not come to be served but to serve. He humiliated Himself by being crucified by a world that hated Him. He has been exalted but his exaltation will not be realized on earth until the second coming. The Christian has also been called to suffer and in act in humility toward his enemies. The Christian is exalted but that exaltation will not be realized until the second coming. After saying all this, Paul says:
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, for it is God who works in you, both to will and to work for his good pleasure.(Philippians 2:12-13 ESV)Paul is not calling for inward navel gazing to determine if good works outnumber bad works so that we can determine if we are really Christians. The "therefore" signals that what follows is a conclusion drawn from the previous section. He says "my beloved." It is a call to the church as a whole. It is not individualistic. It is call to remain obedient to the Gospel and not to listen to the Judaizers. They are to work out their salvation in fear and trembling because it is God who works in them both to will and to work for His good pleasure. They shouldn't loose fear of God and start thinking that they're good works are something to boast about that make them better than others and earn them salvation. Their truly good works are not their own but are worked in them by God. Even their good desires are the work of God. If they start looking towards their good works they have reason to fear and tremble. If they present their good works before God when Christ returns they will be damned. Salvation is found in Christ alone.