God gave the Old Covenant to ancient Israelites by the hand of Moses. This Old Covenant consisted of multiple laws -including the ten commandments- that all Israel had to follow under penalty of death.
According to Christ, God gave the Old Covenant to the Hebrews of old because of their transgression and their rebellion. They were never able to keep the laws of the Old Covenant. The priests did not help the people to follow in righteousness.
God send them prophets to rebuke, warn and admonish them of their evil ways, but they did not listen. They killed their prophets and stoned those God sent to them, and they never listened.
The Old Covenant was a covenant written on stone and the people who were supposed to keep it, broke it constantly. Until, the Messiah, the One Appointed to fulfill the Old Covenant and to redeem the ones under its heavy weight, came.
That was the Lord Jesus Christ, the Messenger of the Covenant. He fulfilled the Law in all its commandments. He abolish death and brought immortality to life as He banished the Old Covenant nailing it to His Cross.
Christ fulfilled and abolished the Old Covenant, that He could establish the New. Now, the believers in the Lord Jesus Christ, are under the New Covenant. Christ made ALL things New. Now, we can be regenerated by the Power of the Holy Spirit. We are New people walking with Christ in the New Covenant.