He made Him who knew no sin to be sin on our behalf, so that we might become the righteousness of God in Him.
Jesus was without sin. He was the perfect sacrifice. He took the punishment and wrath that we deserve. All of us born on this earth after Adam and Eve are born into sin. When Adam and Eve were created they were perfect and without sin. But they disobeyed the Lord eating from the tree of knowledge of good and evil. As a result of their sin they were removed from the garden of Eden and every person born on this earth from them was born into sin. The only one born on this earth who was without sin was Jesus Christ and this was the work of the Holy Spirit inside of Mary.
Those who place their hope and trust in Jesus Christ are declared righteous before God. Sanctification is an on going process throughout our lives in which as we abide in the Lord daily through prayer and the study of His word our lives are transformed from the inside out. The fruit of the Holy Spirit is produced in our lives and the character of Christ is developed. Because of the blood of Jesus we are able to draw near with confidence because our sin no longer remains. In Christ I am truly free because the curse of sin and death has been broken and I have become a child of the Living God.