This letter was written near the end of Paul’s life, and contains thoughts that are ultimately hard to translate.
This is Paul’s attempt to explain his native Hebrew thinking in the Greek language. Consider that Paul was already trying to translate Hebrew into Greek, while we now try to translate the Greek words into English. His messages could get lost in translation, and that can end in misleading results. What makes things more confusing is the fact that first century Greek philosophy viewed human beings as dualities, that they are composed of body and soul, while the ancient Hebrews saw humans as an indivisible unity.
To explain the difference between a person who truly follows Christ and a person who doesn’t, Paul uses the word “flesh”. In the English language, this word usually signifies only the physicality of a person, or even suggests the notion of “sins of the flesh”. But for Paul, someone “in the flesh” refers to someone not turned towards Jesus Christ, someone who is bound by earthly desires and aspirations. Someone living “in the spirit” indicates a person enlivened by the inner presence or “spirit” of Jesus Christ.
A person who focuses only on earthly things (power, money, etc.) will only find death in the end. Paul isn’t speaking of only physical death, however. He is also talking about death of the spirit, death of any hope one can have to earn salvation and enter God’s heavenly kingdom. A person who lives in the “spirit” will eventually be directed towards life, towards hope, towards God. Paul reminds us that the true Christians are not living the ways of the flesh, but instead share the life of Christ spirit. Even physical death cannot deprive them of divine life, which has no end. Paul points out that true believers are formed through (figurative) self-giving death to greater life.
As God’s Spirit raised Jesus from death, so also his followers are raised from death through the presence of the divine Holy Spirit.