I think it would be safe to assume that both Cain and Abel had been taught by Adam from Adam's eyewitness account about Satan's lies and what sin did to their relationship with God.
But just as surely, Adam taught them about God's promised salvation by His mercy through the Seed of men as recorded in Genesis 3:15 who was the only hope for all men, but only Abel took the future sacrificial offering of Jesus Christ seriously enough and followed the very pattern God Himself had set in Genesis 3:21 and faithfully offered the best animal he could in faithful anticipation of what that animal sacrifice truly represented. Although probably unsure just how this would come to pass, he nonetheless stepped out in faithful obedience to God.
However, it is good for us to keep in mind that in a world that is enmity against God, God allowed Abel's faithful obedience to cost him his life. He became the first named witness of God and the cost of faithful obedience in a world driven by carnal nature was ultimately death.
Brethren, Cain allowed sin in by his own faithlessness; Satan makes his second recorded attempt to destroy God's plan as he inspires a vengeance-filled Cain to kill his brother. Abel's self-sacrifice becomes another part of God's permanent record, and ultimately points to what sin always will do, as well as God's mercy tempered judgment, and the cost involved in sacrificial service.
Brethren, this irrevocable truth of Jesus Christ's sacrificial offering as the Promised Seed of men had been taught by His prophets to God's people from the beginning. This is what Enoch taught in word and deed, just as Abel faithfully proclaimed in his sacrificial offering and his death that bears witness to us to this day.
Please turn with me to Genesis 3, verse 13. By doing all He came to do, the Son of God has fulfilled the ancient promise given to the man and woman immediately after they initially sinned: the seed of the woman shall bruise his head [the serpent's head]. He misled her with subtle deceit. But God said to Adam and Eve that He would send someone, that is, Jesus Christ, who would bruise Satan's head.
So we must view Christ coming into this world in terms of all that Satan had done and had produced. Christ came to fight it; He came with a mighty sword.
He came to destroy and to undo the works of the Devil and He did it like this. His coming in the flesh tells us one thing more than anything else: that God is love and that God has loved us with everlasting love.
Satan says God is against you, God hates you, and He enjoys making you slaves. But Christ came in the flesh, which makes a great statement that God loves us. And His sacrifice and resurrection even proves it all the more - that God loves us, and always has and always will. But He loves His church even more than the average human being. And we are so thankful for that.
So here is a world that has rebelled against God. It spat in His face. In arrogance, it lifted itself up against Him. A world like that deserves punishment. It deserves condemnation. Yet into that same world, God sent His Son. He came to contradict Satan's lies in His appearing and coming to undo the original lie. It is proof that God loves us because it is for us that He has done this. Often I wonder about the world's mentality when they are proven, or maybe scientists prove, that God exists. How in the world they can deny it?
We begin to see a fulfilling of the instruction that God undoubtedly gave them as a part of what we see there in Genesis 2:16-17 - which I am sure is just an encapsulation of all of the other instruction that He also gave them. What we see in chapter 3 is an unfolding of the result that takes place whenever lawbreaking occurs. And we see again the reaction of the supreme Governor of everything; and He shows us, then, another function of government in the way that He reacts.
The Governor - the Government - reacts by making a judgment and issuing a sentence. So we see here that another purpose, or responsibility, of government is to enforce its rules. We also see the warning that, because of law , the process toward disorganization will be sped up. That is what we begin to see, especially in those things regarding the curse that came upon Eve and then Adam. Especially the one with Adam - cursed is the ground for your sake.
We are beginning to see the fruit of disobedience to government - the process of disintegration, of disorganization. The movement toward chaos will be increased incrementally by the disobedience of the government, let us say, that is in power. Now, in chapter 4, we see a similar occurrence. We will not go through that, because it is very similar to chapter 3. But I want you to note that what we have here is a very clear record in regard to government, and we are only in the fourth chapter of this most important of all books.
In terms of the actual outworking of this plan, once the earth was re-created, once man was created - this is the first revelation to man that a sacrifice was going to be made that would break sin's grip on our lives.
It is entirely possible that we would never recognize what is being implied here when it says, It shall bruise your head, and you shall bruise his heel, except that we are able to look at other information in other portions of the Bible and recognize what is being spoken of here. But what is being spoken and implied isthe sacrifice of Jesus Christ, by which Satan was going to be defeated, by which man would be free from sin, but that was going to cause the bruising, as it were, of the heel. In other words the damage of the one giving the sacrifice would be temporary; but nonetheless it would occur.
The books of the Bible were written covering a large span of years from about 1500 BC to 100 AD. And the things that were prophesied in the Old Testament to happen to the Messiah were prophesied hundreds and even thousands of years before they were to happen. Even so, they were fulfilled down to the most minute detail.
This is showing that the Messiah would be born of the woman, and that the Messiah would bruise Satan's head, meaning that He would resist all of Satan's temptations, and qualify to replace him as the ruler of the world; that Satan would cause the death of Jesus. This was said almost 4,000 years before the birth of Christ.
So right here at the beginning, at the foundation of the world, we have a prophecy that foresees that a Savior would come and He would win the battle over sin, over Satan. But notice that He is described as her Seed, the woman's Seed. So even in this very early chapter of the Bible, we understand that the Savior of the human race would be a man, someone born of a woman, but someone powerful enough and righteous enough to overcome Satan and be the Redeemer.