Shazam is a comic book character created by Bill Parker and C. C. Beck for Fawcett Comics. He is an ancient wizard (Whiz Comics #2 gives his age as 3,000 years) who gives young Billy Batson the power to transform into the superhero Captain Marvel. Because DC Comics has billed Captain Marvel's adventures under the name Shazam! since 1973, the superhero is often mistakenly referred to by his mentor's name. Because of this, in 2012 DC officially changed Captain Marvel's name to Shazam.
Shazam informs Billy that he is an ancient Egyptian wizard who has been using his powers for many centuries to fight the forces of evil, but that he is now old and not long for this world. He therefore passes along part of his power to Billy, who shouts his name — "SHAZAM!" — to transform into Captain Marvel. Although Shazam is killed, as prophesied, by a giant granite block falling on him, Billy/Marvel can summon the ghost of Shazam for guidance by lighting a special brazier in Shazam's lair (the Rock of Eternity). More superheroes soon joined Marvel in carrying on the legacy of Shazam, including Marvel Family members Mary Marvel and Captain Marvel Jr. Shazam tells that once, 5000 years before, he gave powers to Black Adam, but banished him to the furthest star in the universe for trying to use them to take over the world.
When Billy first meets him, Shazam tells Billy that his name is an acronym for six ancient heroes. Each letter empowers him with certain attributes:
S The wisdom of Solomon
H The strength of Hercules
A The stamina of Atlas
Z The power of Zeus
A The courage of Achilles
M The speed of Mercury
Originally, the wizard's name was Shazamo, the last letter standing for the hero of magic, Oggar. However, Oggar became corrupt and tried to take power from Shazamo. The wizard defeated Oggar and cursed him to live amongst the world of mortals. He was given cloven hooves as a sign of his inner evil, and could cast each magic spell only once. Shazamo then dropped the last letter of his name.