Long ago, there was a Golden Age of the Earth—kings were just, people were ethical and happy, and the world was plentiful and healthy. Everyone lived according to his/her dharma (or, purpose) and people lived a really long time. This was known as the Krta Age.
Unfortunately, this paradise was not to last. Demons, spiritual forces of evil, angry at the gods, began to incarnate themselves on Earth—being born as humans and other creatures. These incarnations of demons oppressed people and really messed things up on Earth.
Desperate and afflicted, Earth sought help and refuge with Lord Brahma, the creator god. Brahma spoke to all the gods and told them that, to counteract the demonic forces, they must incarnate portions of themselves on Earth, in the form of mighty heroes. Thus, all the main heroes and villains of the Mahabharata are partial incarnations of gods and demons. The main conflict of this epic story, therefore, is not only an earthly struggle but a spiritual one as well.