The earliest records of ancient religions in Israel, Babylon (now Iraq), and Greece all refer to a place where the souls or "shades" of people who have died go to stay. This was often depicted as somewhere deep underground. But the idea that this land of the dead was reserved to punish wrongdoers didn't arise until some time in the first millennium BC, in tandem with the belief that this subterranean world housed an infernal (lower, inferior) god.
Initially, this underground world was sometimes a place where greater gods banished lesser gods. The anti-god Ahriman, for example, of the ancient Persian religion of Zoroastrianism (7th-6th century BC), took up residence beneath the Earth in the House of the Lie, amid every sort of filth and stench, after being defeated by the supreme god, Ahura Mazda. Ancient Israelite religions depicted Belial, a demon god, as Lord of the Abyss, an undersea pit. Likewise, Moloch, a god to whom child sacrifices were made throughout the ancient Middle East, was Lord of a subterranean kingdom of flaming lava.
Eventually most of these devil-realms were combined with Sheol (the "Grave"), making this Near East concept of a depository of ghosts a place of torment. The Old Testament describes Sheol as a dark and dusty city with high, impregnable walls and barred gates--a place of no return for both good and bad souls. Not until the 6th century AD did Catholic Christianity modify the Sheol concept, articulating a vision of Hell (an Old English word meaning "covered place") that has endured to modern times: a place where the sinful are sent to burn in eternal fire.
The Bible lacks any explicit statement about Satan ruling Hell, however. It was other early Christian writings that assigned him the role of Hell's warden.