Prophet Adam, peace be upon Him, had two sons named Habil and Qabil, and a daughter. Habil was a pious man and he was always invoking Allah. His brother, Qabil, was greedy, while his sister was described as being very beautiful, until both men were attracted to her. Habil was arranged to be married to her, which upset Qabil.
When Adam and Hawa had children, there was no one else for their children to marry, because Adam and his family were in fact the only ones on the Earth, at the time. So, Adam would get the male brought by one birth married to the female brought by the other. Thus, Habil was set to be married to Qabil's sister.
Their sacrifices were different. Habil offered a fat she-goat, while Qabil offered a bundle of rotten or spoilt plants. Out of the blue, a fire came down from the heavens. The fire then consumed the sacrifice offered by Habil, but Qabil's sacrifices were not consumed by the fire. This meant that the sacrifice of Qabil was not accepted unlike that of Habil's. Angry, Qabil said to Habil, “Your sacrifice was accepted, but mine was not!” Habil replied, “Verily, Allah accepts only from those who are the pious.” This angered Qabil, and he threatened to kill his brother, saying, “I will kill you so as not to marry my sister!” Habil calmly told his brother, “If you do stretch your hand against me to kill me, I shall never stretch my hand against you to kill you: for I fear Allah, the Lord of the mankind, jinn, and all that exists.”
Out of anger, Qabil took an iron rod and beat his brother, injuring him. Later when Habil was sleeping, Qabil threw a stone at him which hit his head and caused him to die from bleeding. Punishment was brought on him very soon afterwards. On the same day he killed his brother, his foot was tied up to his thighbone and his face was forcibly directed up to the sun disk. His face used to go where the sun goes as a way of punishment and penalty in return for what he had done to his own brother. After the punishments, Qabil then took Habil's lifeless body and carried it on his back, not knowing what to do with it. He did this for more than a full year, it is said he did this for at least a hundred years. After time had passed, Allah sent two crows who fought against one another. One of them was killed. The surviving crow scratched the ground to hide the body of the dead crow. Seeing him doing that, Qabil exclaimed, “Woe to me! Am I not even able to do as this crow and to hide the dead body of my brother?” He dug a hole in the ground and placed the corpse of his brother in it, and then buried it, covering the grave with soil.
Prophet Adam eventually returned, and when he found out about the death of his son, Habil, he became very sick at heart and felt great sorrow for him. After the passing of Adam and his wife, Hawa, they left behind a lot of children. One of these children was Prophet Shith, peace be upon Him, who was born some time after the death of Habil. It was narrated that Prophet Shith had fifty scriptures revealed to him, this narration was considered as Sahih (reliable) by Ibn Hibban, but Ibn al-Jawzi considered it to be Mawdhu (fabricated). Allah knows best.
Sources
Holy Qur'an - Surah al-Ma'idah
Ibn Kathir - Tafsir on Surah al-Maidah (ayah 27-31)
Al-Tabari - Tarikh al-Rusul wa al-Muluk (volume 1)
Al-Suyuti - Al-Durr Al-Manthur Fi Tafsir Bil-Ma'thur