Indeed, I count everything as loss because of the surpassing worth of knowing Christ Jesus my Lord. For his sake I have suffered the loss of all things and count them as rubbish, in order that I may gain Christ (Philippians 3:8, ESV)Here we find the essence of genuine salvation: "knowing Christ Jesus my Lord."
For the opportunity to know Christ, Paul suffers loss. He doesn't just want to know who Christ is, he wants to enter into Christ's life. He wants to experience what Christ experienced. All of those things that Paul would have, at one time, considered to be of value, he now considers them to be rubbish (or dung). He does this to gain Christ.