In the universe of Diablo, the demon legions are one of the greatest and most constant foes. If we rewind through all of the death the Eternal Conflict has brought – we see the beginning of demons in a being known as Tathamet.
Before Tathamet, there was a creature named Anu who lived inside of a perfect pearl. Anu was the entirety of all life, but he sought purity. In this pursuit he cast all evil from himself. This evil would manifest as Tathamet, a seven-headed dragon.
Both were held prisoner inside this pearl which became a battleground. In their final conflict, the pearl exploded – resulting in the creation of the universe. Tathamet’s corpse became the Burning Hells as well as birthing the demon race. Each of his seven heads became one of the Great Evils. His strongest heads birthed the Prime Evils, while his lesser heads spawned the Lesser Evils.
Demons serve no purpose other than to cause chaos and death. This placed them as the opposition to the Angels in the cycle of never ending war known as the Eternal Conflict.
There is no truly easy way to explain the hierarchy of the demons, however I can give a basic understanding:
Diablo, Lord of Terror
Mephisto, Lord of Hatred
Baal, Lord of Destruction
Duriel, Lord of Pain
Andariel, Maiden of Anguish
Belial, Lord of Lies
Azmodan, Lord of Sin
Ultimately, the three Prime Evils are the three who rule over the hordes of demons. However, each of the seven evils have their own realm within hell. This structure gives even the Lesser Evils power as each have their own armies. It is unknown if each Lesser answers to a specific Prime; it is known through the context of the Dark Exile (an event in which Azmodan and Belial managed to overthrow and banish the three Prime Evils to the mortal plane) that the Prime Evils are the ones who hold a large majority of the authority.
An outlier to all of this would be the Mallet Lords. While the realms of the evils lay in the center of Hell it is the Mallet Lords who rule over the far reaches. They refuse to join the army of any of the Lesser Evils though it is believed they still answer to the Prime Evils as they appear in Diablo III in the assault of Heaven.
While most of this information is extremely interesting to understand, it is – as of Diablo III – that most of it is irrelevant. There only exists one evil. Backtracking to when Diablo was first sealed inside a broken soulstone which a hero by the name of Aidan plunged into himself to prevent Diablo’s escape.
Despite having contained Diablo, Aidan’s soul was corrupted by his presence. Eventually Aidan meets a woman by the name of Adria who sees the Lord of Terror’s energies. Adria would later come to birth a daughter named Leah. Adria also managed to alter the Black Soulstone to draw in the souls of the seven evils.
While heroes killed the Lesser Evils Andariel and Duriel as well as all three of the Prime Evils; everything was going according to plan. Teaming up with Nephalem, Adria was able to end the lives of the two final lesser evils Belial and Azmodan. With all seven evils inside the Black Soulstone, Adria plunged the soulstone into Leah who now served as Diablo’s vessel.
This rebirth served to solidify Diablo as the sole evil of Hell and all its realms. Despite his death at the end of Diablo III, his soul was returned to the Black Soulstone that later had its essence absorbed by Malthael. When Malthael died at the hands of the Nephalem, Diablo was freed to lick his wounds and begin his Reign of Terror once more.