In the previous chapter, Paul talks about how the law of sin is too powerful for his flesh to overcome. At the end, he concludes:
Wretched man that I am! Who will deliver me from this body of death? Thanks be to God through Jesus Christ our Lord! So then, I myself serve the law of God with my mind, but with my flesh I serve the law of sin.
This is a battle we fight and lose every day. Because of this losing battle, we are destined for death. However, Paul does not leave it at that. In the middle of his misery, he seems to break form and praise God and the Lord Jesus Christ. Why does he do that? Keep reading.
In Romans 8 he begins with stating the fact that there is no condemnation for those in Christ Jesus. We are now living freely in the Spirit of life.
How can this be? The law of the Old Testament was too weak to overcome sin in the flesh. Paul gives the answer.
For God has done what the law, weakened by the flesh, could not do. By sending his own Son in the likeness of sinful flesh and for sin, he condemned sin in the flesh, in order that the righteous requirement of the law might be fulfilled in us, who walk not according to the flesh but according to the Spirit.
Jesus came down in the form of sinful flesh and conquered it. It did not have any power over Him. Sin has been condemned to death. We no longer have to be slaves to sin in the flesh. We can live free of sin and condemnation in the Spirit of life.
But if Christ is in you, although the body is dead because of sin, the Spirit is life because of righteousness. If the Spirit of him who raised Jesus from the dead dwells in you, he who raised Christ Jesus from the dead will also give life to your mortal bodies through his Spirit who dwells in you.
Do not take my word for it. Read it for yourselves in Romans 8:1-11. Let God speak to you through His Word.