At first, there was no mortal realm, there was only the High Heavens and the Burning Hells, fighting over who-knows-what. The forces of the Heavens are apparently charaterised as a bunch of arrogant twats, whilst the forces of Hell are a bunch of sadistic dicks.
Eventually, Archangel Inarius, Lesser Evil Lilith and a bunch of other demons and angels grew tired of the conflict and created Sanctuary (mortal plane), along with the Worldstone, which kept it out of sight of both Heaven and Hell. Out of angel-demon crossbreeding came the Nephalem, the Ancients, who were more powerful than either angel or demon.
Conflict broke out as to what to do with them. Inarius wanted to reduce their power, and make them into his loyal devotees, whereas Lilith wanted to make them into her personel army to assault the Heavens. Inarius then altered the Worldstone, so that it reduced the Nephalem's power with each passing generation, eventually reducing the Nephalem to mere mortal men.
Nothing lasts forever, so also the secret of Sanctuary. Both the Heavens and Hells discoverd it. Though most of the Archangels prefered to see Sanctuary burned to ashes, it was decided to let it be. The Burning Hells discovered that human souls were a very effective energy source. He who controlled the souls, would likely win the war.
At first, both sides tried to gain the humans' alleagance via subtelty, by installing religions: the Cathedral of Light for the Heavens and the Triune for the Hells. the Burning Hells noticed that the religious snare was not very effective, and instead used force to subdue the humans. Eventually the Four Lesser Evils, Andariel, Lilith, Duriel and Asmodon were fed up with Sanctuary, kicked the Three Prime Evils out off Hell and focused once again on assaulting Heaven directly.
Diablo, Baäl and Mephisto went on a tour of destruction all across Sanctuary, until they were defeated and caught by the Horadrim mage clan and subsequently sealed in the Soulstones provided by Tyrael, made from shards of the Worldstone. However, ARchangel Izual betrayed the High Heavens had taught de Prime Evils how to corrupt the Soulstones and use them to their advantage. Through the Soulstones, the Prime Evils could tap on the energy of Hell, so that, even in the mortal plane of Sanctuary, they would be at their strongest.
The three Soulstones were hidden near the places were the Prime Evils were caught. Diablo's was hidden in the deepest crypt of a Horadrim Monastary, where 200 years later King Leoric founded Tristram; Mephisto's was hidden in the lowest dungeon of the Temple of Light, in the Zakarum capital of Travincal; Baäl's Soulstone was broken and could not contain him, so Tal Rasha, leader of the Horadrim, was used as a vessel instead. He was buried in a tomb, somewhere deep in the desert.
From there on, the Prime Evils worked on corrupting their environments, planning their escape and the reinstatement of their role as Lords of the Burning Hells and conquer Sanctuary to use it's inhabitant's souls as fuel for their war effort.