Cayin was born and raised with a brother named Hevel. Cayin is a farmer. His name means "Cana", which is to acquire or buy. Cayin wanted to be the best in Olam Haze and better than Hashem.
Hevel's occupation was a Shepard and had a brother named Cayin. Hevel's name in Hebrew is nothingness. He thought that Olam Haze was superficial.
Cayin offered flax seeds which showed that he was not appreciative of Hashem and gave him the worst crop of his farm. He believed that he worked that land and that it was all his doing rather than Hashem's. His offer was rejected by Hashem. On the other hand, Hevel offered the best of his group of sheep because he knew that it was all Hashem's doing. Therefore, his offer was accepted.
Hashem thinking to himself: "How inconsiderate of Cayin to only offer flax seeds which is the worst of his agriculture. I shall take Hevel's offering which is the best sheep of his flock. I shall send fire down and burn Hevel's offering but not Cayin's."
Hashem advised Cayin to offer a better sacrifice next time and to do Teshuva. BUT rather than doing as Hashem told him to, he killed his brother because he was jealous that his sacrifice was accepted. Hashem punished Cayin for doing this, and said that the land will be harder to service, and that he will wander the land. This is an example of sibling rivalry because Cayin was jealous of Hevel so he took the wrong approach and killed him because his offer was accepted and Cayin's wasnt.
Hashem: Because you killed your brother, your consequence shall be that it will be harder for you to work the land and you shall wander the land. Cayin: Can I please have one more chance? Hashem: NO, you shall do as I say!