"Therefore the Law has become our tutor to lead us to Christ, so that we may be justified by faith."
"The Mosaic Law was not given to produce salvation. The purpose of the Law was to help people see how far short they had fallen of God's righteous demands so they would cast themselves on the grace of God. Even during the time of the Law, grace was made available through the specified sacrifices for sin. These pointed forward to the Lord Jesus Christ, who was the sacrifice for sin." -- Theodore Epp, Back to the Bible
What the law was unable to do, Christ did through His sacrifice on the cross. And He did it once for all. The Ten Commandments are our "tutor". They help us to see the holiness of God and the futility of trying to please Him by our own merit. It simply can't be done. But when we receive Christ and His sacrifice through faith, we are justified before a Holy God. His grace abounds in Christ.