It is impossible to overstate the importance of the distinction between law and grace. The question of law vs. grace lies at the heart of Scripture, and is foundational to the Christian life:
For sin shall not be master over you, for you are not under law but under grace. (Romans 6:14, NASB)
John's Gospel begins with the amazing statement that
the Law was given through Moses; grace and truth were realized through Jesus Christ (John 1:17, NASB)
So we have two foundational principles: first, Christ's coming is characterized by grace and truth
in contrast to the Law; and second, that we are not under the mastery of sin
because we're not under law, but under grace.
Now, Scripture differentiates between "law" and "the law". The first is a principle, the second is specifically the Law that Moses received from God. I've written about the Mosaic Law before, so there's perhaps nothing to be gained from going into great detail about it here. To a certain degree we can use the two interchangeably, because the Law of Moses is the most perfect law (Romans 7:9--12). This is really the only Law God gave, and so we might think of it as the ultimate example of the principle of law. Certainly if the Law of Moses was limited through the sinfulness in our flesh (Romans 8:1--4), then any other law must be just as futile.
But today I'm more interested in the question of "law" than "the law." That is, law as a principle as opposed to a specific Law.
Let's start by making it clear that God has never justified a sinner on the principle of law. Sinners have only ever been justified on the basis of faith (see Romans 4). From Abel to today, God justifies the one who does not work but believes. There has never been one sinner justified, but by faith.
But God did give the Law to Moses, and the people agreed to it (Exodus 24:7). And so they were tried (as it were) under law. The principle of law is, God deals with us based on what we do. We work to be accepted by Him.
Grace, of course, is the opposite principle. Grace is the principle that God treats us as He wants to, with no regard to what we deserve. Grace is the principle that we work because He has already accepted us. So where law says you get what you work for; grace says you get what God wants to give you, regardless of your work. Law is the principle of what man does, grace is the principle of what God has done.
Where law said, "forgive us our debts as we forgive our debtors," grace says, "forgive one another as God for Christ's sake has forgiven you." Law says, obey and God will bless; grace says, God has already blessed, now obey.
We need to be jealous of grace. We need to be very careful that we don't give up the grace of God. It's easy to fall into legal thinking, and thus abandon grace. We're not justified by law, we're not to walk by law. We can't begin in the spirit and finish in the flesh: the principle of our justification is the principle of our sanctification.
There is no place we see the distinction between law and grace like in the whole notion of our approach to God. Believers under the Law couldn't approach God: the high priest alone, and only once a year, was allowed into God's presence (cf. Leviticus 16; Hebrews 9:6--10). And there was danger in approaching God: the high priest is warned in Leviticus that he might actually die if he approaches God unworthily. This is approaching God on the principle of law.
But Hebrews teaches that we are to approach on the principle of grace. We have an High Priest who has already been accepted into God's presence for us. And because He is there for us, we are to approach with full assurance (Hebrews 10:19--25). Our consciences are purged once, and now we have no more conscience of sins. We come into God's presence freely, with no thought of any judgment at all, because God has already declared us clean and fit for His presence. This is exactly the principle of grace: God has already done all the work, we are only called to reap the rewards.
Now, the whole question of law and grace centers on the paradox of God's Sovereignty and Man's Responsibility. Law says, "Man is responsible," while grace says, "God is sovereign." And Man's responsibility and God's Sovereignty meet in exactly one Person; the Lord Jesus Christ is both Sovereign God and Responsible Man. In fact, Man's responsibility is completely fulfilled and completed in Christ. God has looked for a righteous Man, and it was when Christ came that He found that Man. Christ is the Man that God was looking for, and He has stopped looking. This is the real point of Hebrews 1:1--3. God has found what He wanted: one Man has pleased God, and God's no longer looking for anything from Man. When I approach God, I have nothing to offer Him except Christ. And God is looking for nothing from me, except Christ. Christ is my righteousness, my holiness, my wisdom, and my redemption (1 Corinthians 1:30 & 31).
It's important for us to understand this principle: that God is no longer looking for anything from Man. What God wanted in Man He found in Christ. This bears repeating: God has found what He was looking for, and He's not looking any more. God is delighted in His Son, and He's called us to be delighted in His Son too.
So when I go to approach God, He's not looking at me to see whether I'm worthy to be there. He's already said I am (Colossians 1:11 & 12), and He's invited me to come in (Hebrews 10:19--25). So I approach God. But when I get into God's presence, I find that being in God's presence is a very cleansing thing. This is what 2 Corinthians 3:18 says, we become like Christ as we look at His glory. Notice the order: we don't see Him as a result of getting better; we get better as a result of seeing Him. The former is law, the latter is grace.
Someday we're going to see Christ physically, and that's a cleansing thing too (1 John 3:2 & 3). Notice, it's the hope of seeing Him that leads to purity. It's not that we purify ourselves so we can see Him, it's that we're guaranteed to see Him, and this makes us purify ourselves.
Law reasons from man to God; grace reasons from God to man. Law says, "I'm no good, so God can't possibly love me" but grace says, "God is unimaginably good, and therefore He loves me." Grace is sovereign. If I am reckoning on my own goodness, I find myself very quickly despairing, because I've basically none. But if I reckon on God's goodness, I can rest because I know that will never change.
Now it is true that God disciplines His children; but notice, He does it because they are His children. In fact, Hebrews makes God's discipline proof of sonship (Hebrews 12:7--11). We don't become God's sons through discipline, but we are disciplined because we are His sons. Notice that even God's discipline on us flows from grace. Again, grace is the principle that we are to live up to what God has already given. But He has already given it, regardless of whether we live up to it or not.
William R. Newell said it this way:
To believe, and to consent to be loved while unworthy, is the great secret. ("A Few Words about Grace," Romans Verse-by-Verse)
This is what Scripture presents as the Christian life. God has abundantly blessed me with all spiritual blessings in the heavenlies in Christ. This is where it all begins: there's nothing for me to earn, because Christ has already earned it. This is grace: not what I am for God (law), but what God is for me.