Galatians 3

10 There are many commands in the Law, and several that warn of severe penalties for non-compliance. However, even those that do not have explicit consequences are covered by Deu 27:26. This same idea is echoed in James 2:10, where he states that anyone who breaks even one law, no matter what it is, is a lawbreaker.
11 However, while one is cursed for not keeping all the Law, even perfect compliance would not justify a person before God because justification comes through one's good relationship with Him. This relationship is built on faith, that is, trust in something (or Someone, in this case) humans cannot fully understand, define, or measure (Heb 11:1). So, while the world may consider someone "righteous" who obeys most of the Law, God's definition of righteousness is founded on faith in Him.
12 When someone obeys the Law, it does not necessarily mean that he has faith in God. The Law relates to what is physical - what can be seen and measured, but faith occurs in the mind. Someone might reject God but obey the Law to avoid getting into trouble from civil or religious authorities. On the other hand, those who have faith in God will want to obey the Law because it outlines the kinds of activities that please and displease Him. Note that faith is not merely belief in God's existence, for even demons know that God exists, but in addition is the acceptance of Him as the ultimate authority (James 2:19).
13 However, it is a sad fact of the human condition that even those who have faith in God cannot follow the Law completely (Isa 53:6a). Thus, we are all under the curse of the Law, even if we have faith in God. However, God's justice allows something innocent to take the punishment for a guilty party. The sacrificial system set up in the Old Testament is a picture of this: a physically spotless and "innocent" animal would be killed to atone for (i.e., cover) the sins of a person or group of people. This symbolic trading of life for life required a blood sacrifice. However, the sacrificial system did not provide permanent remedies, since the creatures sacrificed could not be considered the equal counterpart to even the smallest of man's sins. Therefore, God sent His Son, Jesus, to be the perfect and permanent sacrifice. Jesus lived a perfect life and was able to offer Himself up as a truly spotless sacrifice sufficient to cover the sins of every person. Deu 21:23 specifically states that being hung on a tree is symptomatic of being cursed by God, and Jesus was "hung on a tree" either literally or figuratively during the Crucifixion to become (or endure) the curse for us so that we would not have to suffer the ultimate penalty - eternal separation from God (Isa 53:6b).
14 Jesus' sacrifice is sufficient to cover all the sins of mankind, past, present, and future. However, it is only available to those who have faith in God and the availability of this Grace (undeserved favor). Thus, again, it is only through belief in God that one is justified before Him and is saved from the eternal separation from Him that people are otherwise doomed. It should also be clear that since the Mosaic Law is not a requirement for salvation that the Gentiles (non-Jews) can also share in the blessings of Abraham. Those who believe God and seek Him are rewarded with the presence of the Holy Spirit during our lives on earth, and then eternal life with God in Heaven after this (Heb 11:6).