The Mahabharata is an ancient Sanskrit poem describing the mythical Kurukshetra War between two sets of brothers descended from the king Bharata: the Pandavas and the Kauravas. It is considered so historically important to the Hindu tradition that it is sometimes referred to as the "fifth Veda." The four Vedas are the foundational texts of Hinduism, outlining tenets of the faith and doctrines for living, but none of them discuss the tenet of dharma.
The Mahabharata takes dharma as its central theme, and the principle is discussed at length in the portion known as the Bhagavad Gita and in Bhisma's extensive conversation with Yudhisthira. The Bhagavad Gita on its own has long been considered a vital text in Hindu philosophy, influencing thinkers as recent as Mohandas Gandhi in the 20th century.
In its written and unabridged form, the poem is composed of 100,000 verses, making it the longest of all the ancient epic tales. Yet, unlike the Vedic texts, which are considered to have been passed down and copied pristinely down to the letter throughout the ages, the Mahabharata did not initially manifest as a written work. Instead, the tale was passed down through an oral tradition, meaning that the version we have now is something of a hodge–podge of various versions and revisions made by its tellers. In this sense, the Mahabharata is similar to the Greek war epic the Iliad, which was passed down orally until being committed to writing around the 8th century BC, roughly the same period when the Mahabharata began taking shape.
This oral tradition is reflected in the text of the Mahabharata itself, as every single story told is told by one person to another person. The entire epic itself is framed as being recited by a single storyteller.
Scholarship on the Mahabharata tends to note that the text is intended to be encyclopedic, touching on everything from the tenets of dharma to the responsibilities of a king to the true nature of women. And while it is the only ancient Hindu text that takes a narrative form, it is laden with didactic, philosophical segments, be they in the form of allegorical fables or didactic discourse between its characters. Therefore, the Mahabharata is part epic poem, part Hindu philosophical treatise.