Thousands of years ago, a Champion named Vlarem, created a large prison to hold a dragon-like demon named "Three Faces of Evil" captive. The prison was made out of both a chunk of Heaven and a chunk of Hell. The prison was called The Rock of Eternity, and it later also became the prison of the Seven Deadly sins (Lust, Gluttony, Greed, Sloth, Wrath, Envy and Pride).
As time went on, Vlarem (now known as the Wizard Shazam), grew weary of battling evil. As the gods who had empowered him where long forgotten, Shazam petitioned for the powers of different gods, and bestowed them upon a new champion. At that time, the Rock of Eternity also became a nexus of power. It channels the power to all those who were empowered by Shazam.
The Rock was once destroyed by the Spectre and the Sins freed, but has since been re-created and the sins re-imprisoned.