For the law was given through Moses, but grace and truth came through Jesus Christ.
In the Bible, when it talks about "the law" it refering to God's law, or God's standard of right and wrong. God's moral law was summarized in the 10 commandments given to Moses on Mr. Sinai. God's standard clearly showed the people of that God that they had sinned against God. However, there was no salvation in just being "good" because they already had sinned. God's grace came through Jesus Christ.