For greater detail, see chapter 19 in the Second London Baptist Confession of Faith:
Chapter 19 - The Law of God
1. God gave Adam a law of comprehensive obedience written in his heart and a specific precept not to eat the fruit of the tree of the knowledge of good and evil.1 By these God obligated him and all his descendants to personal, total, exact, and perpetual obedience.2 God promised life if Adam fulfilled it and threatened death if he broke it, and he gave Adam the power and ability to keep it.3
1Genesis 1:27; Ecclesiastes 7:29. 2Romans 10:5. 3Galatians 3:10, 12.
2. The same law that was first written in the human heart continued to be a perfect rule of righteousness after the fall.4 It was delivered by God on Mount Sinai in ten commandments and was written in two tables. The first four commandments contain our duty to God and the other six our duty to humanity.5
4Romans 2:14, 15. 5Deuteronomy 10:4.
3. In addition to this law—usually called the moral law—God was pleased to give the people of Israel ceremonial laws, containing several typological ordinances. In some ways these concerned worship, by prefiguring Christ, his graces, actions, sufferings, and benefits.6 In other ways they revealed various instructions about moral duties.7 Since all of these ceremonial laws were appointed only until the new ordera arrived, they are now abolished and taken away by Jesus Christ. As the true Messiah and the only law-giver, he was empowered by the Father to do this.8
areformation
6Hebrews 10:1; Colossians 2:17. 71 Corinthians 5:7. 8Colossians 2:14, 16, 17; Ephesians 2:14, 16.
4. To Israel he also gave various judicial laws, which ceased at the same time their nation ended. These laws no longer obligate anyone as part of that institution. Only their general principles of justice continue to have moral value.9
91 Corinthians 9:8–10.
5. The moral law forever requires obedience of everyone, both those who are justified as well as others.10 This obligation arises not only because of its content but also because of the authority of God the Creator who gave it.11 Nor does Christ in any way dissolve this obligation in the Gospel; instead he greatly strengthens it.12
10Romans 13:8–10; James 2:8, 10–12. 11James 2:10, 11. 12Matthew 5:17–19; Romans 3:31.
6. True believers are not under the law as a covenant of works, to be justified or condemned by it.13 Yet it is very useful to them and to others as a rule of life that informs them of the will of God and their duty. It directs and obligates them to live according to its precepts. It also exposes the sinful corruptions of their natures, hearts, and lives. As they examine themselves in light of the law, they come to further conviction of, humiliation for, and hatred of sin,14 along with a clearer view of their need for Christ and the perfection of his obedience. The law is also useful to the regenerate to restrain their corruptions because it forbids sin. The punishment threatened by the law shows them what even their sins deserve and what troubles they may expect in this life due to their sin, even though they are freed from the curse and undiminished severity of it. The promises of the law likewise show them God’s approval of obedience and the blessings they may expect when they keep it, even though these blessings are not owed to them by the law as a covenant of works. If people do good and refrain from evil because the law encourages good and discourages evil, that does not indicate that they are under the law and not under grace.15
13Romans 6:14; Galatians 2:16; Romans 8:1; 10:4. 14Romans 3:20; 7:7, etc; 15Romans 6:12–14; 1 Peter 3:8–13.
7. These uses of the law are not contrary to the grace of the Gospel but are in sweet harmony with it,16 for the Spirit of Christ subdues and enables the human will to do freely and cheerfully what the will of God as revealed in the law requires.17
16Galatians 3:21. 17Ezekiel 36:27.