To transform back into Billy Batson, Captain Marvel just has to say the same word.
Whenever Billy says the word “Shazam!”, a magical lightning bolt strikes him, and he becomes the adult Captain Marvel, though he still has Billy’s intellect and personality.
Billy Batson, a.k.a Captain Marvel, was created by Fawcett Comics in 1940, and at one point was considered the most popular superhero of the 1940s.
Like most comic book characters, Billy’s origins have been retconned several times, but the basic premise remains the same.