God made Jesus sin. He treated Him as if He had committed our sin, even though He never sinned. God punished Jesus for our sin and when we place our faith in Jesus, God looks at us and He sees the righteousness of Jesus. This is referred to as the doctrine of substitution.