Galatians 3:24; KJV
"Wherefore the law was our schoolmaster to bring us unto Christ, that we might be justified by faith."
Paidagogs (schoolmaster) denotes a slave whose duty it was to take care of a child until adulthood. The "tutor" (NKJV) escorted the child to and from school until adulthood, but didn't actually do the teaching of the child. "Schoolmasters" were often harsh disciplinarians, causing those under their care to yearn for the day in which they would be free from their custody.
The Law of Moses had the function of leading the Jews to Christ. Once the Christ came and the faith was revealed, the function of the Law was completed. The law brings us to Christ where we are justified by faith.