The Mahabhaarata is considered a Great Epic of India and was compiled by the Sage Ved Vyasa. Though the Mahabharata has the story of many lives woven into one another, the predominant narration is of 2 brothers and their families. Dhritrashtra and Pandu were brothers. Dhritrashtra married Gandhaari and Pandu married Kunti and Madri. Pandu had 5 sons who are popularly known as Pandavas Yudhishtira, Bhima, Arjuna, Nakula, Sahadeva. Dhriraashtra had 100 sons.They were called the Kauravas.
The five sons of Pandu were actually fathered by five Gods (fatherhood was mortally dangerous for Pandu, because of a curse) and these heroes were assisted throughout the story by various Gods, sages, and brahmins, including the great sage Vyasa (who later became the author of the epic telling this story), who was also their actual grandfather (he had engendered Pandu and the blind Dhrtarastra upon their nominalfather's widows in order to preserve the lineage). The one hundred sons of the blind king Dhartarashtra, on the other hand, had a grotesque, demonic birth, and are said more than once in the text to be humanincarnations of the demons who are the perpetual enemies of the devotees of the lord. The most dramatic figure of the entire Mahabharata, however, is Sri Krishna who is the supreme personality of Godhead himself, descended to earth in human form to reestablish his devotees as care takers of the earth, and who practice Dharma. Lord Krishna was the cousin of both parties, but he was a friend and advisor to the Pandavas, becamethe brother-in-law of Arjuna, and served as Arjuna's mentor and charioteer in the great war.
The Pandavas performed a great sacrifice (Yajna) which made Duryodhana, the chief of the Kauravas jealous and greedy. Kauravas invited the Pandavas for a game of dice and cheated in the game. Yudhishtira lostthe game multiple times and each time he lost some possession in the betting that followed. The Pandavas even lost their common wife Draupadi. They humiliated all the Pandavas and physically abused Draupadi;they drove the Pandava party into the wilderness for twelve years, and the twelve years of exile had to be followed by the Pandavas' living somewhere in society, in disguise, without being discovered for another year.
The Pandavas fulfilled their part of that bargain by living out side the kingdom, but the evil leader and eldest son of Dhartarashtra, Duryodhana, was unwilling to restore the Pandavas to their half of the kingdom when the thirteen years had expired. The two sides summon vast armies to their help, and line up at 'Kurukshetra' for a war. Before the battle, Arjuna, seeing himself facing great-uncle Bhishma, his teacher Drona and his brothers on the other side, has doubts about the battle and he fails to lift his 'Gandiva' bow. Krishna wakes him up to his call of duty in the famous Bhagavad Gita section of the epic.
The Pandavas atlast won the eighteen day battle, but there was a lot of loss involved in the war that troubled many except those who were able to understand things on the divine level (chiefly Krishna, Vyasa, and Bhishma). At the end of the 18-day battle, only the Pandavas, Satyaki, Ashwathama and Krishna survive.
After seeing the carnage, Gandhari who had lost all her sons, curses Krishna to be a witness to a similar annihilation of his family, for though divine and capable of stopping the war, he had not done so. Krishna accepts the curse, which bears fruit 36 years later.
When they learned of this, the Pandavas believed it is time for them to leave this world too and they embarked upon the 'Great Journey,' which involved walking north toward the Himalayas, that is toward the heavenly worlds, until one's body dropped dead. One by one Draupadi and the younger Pandavas died along the way until Yudhishthira was left alone with a dog that had followed him all the way. Yudhishthira made it to the gate of heaven and there refused the order to drive the dog back, at which point the dog was revealed to be an incarnate form of the God Dharma (the God who was Yudhishthira's actual, physical father), who was there to test Yudhishthira's virtue. Once in heaven Yudhishthira faced one final test of his virtue: He saw only the Dhartarashtra clan in heaven, and he was told that his brothers were in hell. He insisted on joining his brothers in hell, if that were the case! It was then revealed that they were really in heaven, that this illusion had been one final test for him.