In this passage here, you see David prophesying about Jesus, and what He was to do.
Psalms 40:7-10
7 Then said I, Lo, I come: in the volume of the book it is written of me,
8 I delight to do thy will, O my God: yea, thy law is within my heart.
9 I have preached righteousness in the great congregation: lo, I have not refrained my lips, O LORD, thou knowest.
10 I have not hid thy righteousness within my heart; I have declared thy faithfulness and thy salvation: I have not concealed thy lovingkindness and thy truth from the great congregation.
Now, let's break Hebrews 10(not all of it, but about half of this chapter) down into segments to get to the heart of the matter:
Hebrews 10
1 For the law having a shadow of good things to come, and not the very image of the things, can never with those sacrifices which they offered year by year continually make the comers thereunto perfect.
2 For then would they not have ceased to be offered? because that the worshippers once purged should have had no more conscience of sins.
3 But in those sacrifices there is a remembrance again made of sins every year.
Here, Paul is showing that the Law could not eternally appease God's wrath concerning sin, because each year, He remembered them, and another sin sacrifice had to take place.
4 For it is not possible that the blood of bulls and of goats should take away sins.
5 Wherefore when he cometh into the world, he saith, Sacrifice and offering thou wouldest not, but a body hast thou prepared me:
6 In burnt offerings and sacrifices for sin thou hast had no pleasure.
Here again, shows the shortcomings of the Law. The Law made no one, and I mean no one, saved. God had no pleasure in burnt offerings and sacrifices for sin, because He remembered them from year to year.
7 Then said I, Lo, I come (in the volume of the book it is written of me,) to do thy will, O God.
8 Above when he said, Sacrifice and offering and burnt offerings and offering for sin thou wouldest not, neither hadst pleasure therein; which are offered by the law;
9 Then said he, Lo, I come to do thy will, O God. He taketh away the first, that he may establish the second.
10 By the which will we are sanctified through the offering of the body of Jesus Christ once for all.
Jesus came to do the will of His Father. The will of the Father was for Him to die for sinful mankind.
11 And every priest standeth daily ministering and offering oftentimes the same sacrifices, which can never take away sins:
12 But this man, after he had offered one sacrifice for sins for ever, sat down on the right hand of God;
13 From henceforth expecting till his enemies be made his footstool.
14 For by one offering he hath perfected for ever them that are sanctified.
Again, Paul is showing that the daily ministering and offering was insuffiecient to appease God's wrath. Jesus, by His one offering, has perfected those who have been redeemed/bought back. The Law could never do this.
15 Whereof the Holy Ghost also is a witness to us: for after that he had said before,
16 This is the covenant that I will make with them after those days, saith the Lord, I will put my laws into their hearts, and in their minds will I write them;
17 And their sins and iniquities will I remember no more.
18 Now where remission of these is, there is no more offering for sin.
Jesus made a new covenant with us, and in this covenant, our sins, once they have been blotted out by the blood, will never be brought back before us. Under the Law, it was never this way.
Jesus was/is the only One who could ever appease God's wrath. God has no pleasure in seeing His creation suffer in torment. However, in His righteousness, sin can not, and will not go unpunished.
Eze. 33:11 Say unto them, As I live, saith the Lord GOD, I have no pleasure in the death of the wicked; but that the wicked turn from his way and live: turn ye, turn ye from your evil ways; for why will ye die, O house of Israel?