We were crucified in the flesh with Christ. Our flesh has been condemned and just as Christ died and rose again, so have we now as we walk in the Spirit, no longer gratifying the sinful desires but instead allowing a process of transformation to occur as the Holy Spirit begins to work in us. God said He will write His laws into our hearts and into our minds.
This does not mean you stop sinning completely. You will never stop sinning entirely so long as you live on this earth. Even Paul said that he wishes to do good, but cannot. However, when he sins, because his flesh was crucified it is no longer him that commits the sin, but the sin living inside of him.
It is the same with us. The difference is that when we walked in the flesh, we lived to satisfy the desires of the flesh, and these were envy, malice, sexual immorality, slander, drunkenness - but now that we walk according to the Spirit, although we are still in a sinful vessel we no longer gratify these temptations and although we still fall and falter, we have an advocate who is Jesus Christ such that sin is taken out of the equation so that there is only relationship with the Father left.
As you draw nearer to God, the less dominion sin will have over you. When you walk according to the Spirit, you begin to bear fruits of the Spirit, which is peace, love, joy, thanksgiving and a will to do good. You can never be perfect, and you cannot even strive to be perfect as the law has no power to make you righteous, but the closer you draw to God and understand that He loves you no matter whether you sin or not, sin loses its power as you start to walk according to the Spirit with the fresh revelation of Jesus Christ. It is not freedom to sin, but freedom from sin.