After Adam and Eve left the Garden of Eden, they felt sorry and God told them they can show Him how they felt by sacrificing a lamb. So they did that for many years.
They had two children, Cain and Abel. Cain was a farmer and Abel was a shepherd.
Adam and Eve told their sons about sacrificing a lamb to God as a form of worship. Abel wanted to make it special for God so he sacrificed his best lamb.
Cain, on the other hand, felt that it would be a waste to sacrifice his best possessions so he gave God his extra straw rather than his wheat crop.
Cain watched his brother's lamb being burnt up completely on the altar, compared to his straw which never really caught fire at all. It showed that God is in favor of Abel's sacrifice.
Cain was angry and jealous; so he killed Abel.
And the Lord spoke: "Cain, where is your brother?". Cain answered: "I don't know. Am I my brother's keeper?"
The Lord punished Cain for his deeds by putting a curse on him for the rest of his life.