The Bible, specifically the book of Jude, mentions "the way of Cain". Before finding out what this means, we first have to discuss Cain himself.
Cain was the first son of Adam and Eve, the first people. He was followed by his brother Abel. At some point after Adam and Eve's sin, a system of sacrifice was set up. This was a reminder that sin must be paid for. In Genesis chapter 4, we see that Abel brought a sacrifice from the best that he had, while Cain "brought some of the fruits of the soil." Some say that Cain should have brought an animal sacrifice like his brother did, but the text says that Cain was a tiller of the ground, so presumably bringing a sacrifice from the ground was also acceptable.
Look at the wording, though. Cain brought "some", but Abel brought the "fat portions of the first born of his flock". Abel brought his best, Cain did not. Abel brought the best of what he had, out of faith knowing God would provide more, but Cain did it out of religious duty absent of faith. Just an exercise.
God accepted Abel's offering not only because it was offered in obedience, but also out of faith.
Cain did it wrong, without faith.
Thus, God did not accept it.
"So Cain was very angry, and his countenance fell."
Cain took God's rejection personally and so grew wrathful. His heart was in a bad place and instead of repenting, he got jealous of Abel. God asked him what he was angry about and then warned him that "sin was crouching at the door. Master it or it will master you."
Did Cain heed God's warning?
No.
Instead, he took his brother into the field and killed him.
God wasn't happy. He asked a leading question: "Where is Abel?"
"I don't know; am I my brother's keeper?"
Cain murdered Abel and then acted like he didn't know anything!
Now that Cain had sullied the ground with innocent blood, God cursed Cain's ability to work the ground. Cain would be a nomad, a "restless wander", always looking for a place to work but never finding it. His talent was removed from him forever.
Cain complained that his punishment was too much for him. He knew he would be away from God's presence in Eden and that someone would try to kill him. But God in His grace and mercy, undeserved by Cain, put a mark on the murderer so that no one would kill him.