**Possible Spoilers for Whiz Comics #2 (1940, Kingdom Come (1996), Captain Marvel #17 (1969), and other titles.
The hero known as Shazam, previously known as the original Captain Marvel, debuted in Whiz Comics #2 (1940). However, he is a hero who doesn’t actually exist. You see Shazam’s human alter ego is Billy Batson, and Billy has been given a magic word (Shazam) by a wizard that transforms him into this heroic persona. The magic word endows Billy with select aspects of different mythological beings, including the Roman god Mercury’s speed and the Greek Titan Atlas’s stamina.
Now when Billy or Shazam say the magic word with intent to change, they will apparently switch places. Much like Marvel’s Captain Marvel (Mar-Vell) and Rick Jones would exchange places when necessary (Captain Marvel #17 ). Yet, it has never been explained (at least to my knowledge) where Shazam supposedly is when Billy is around. Examples are found in the series JLA: Without Grown-Ups (1998) and the mini-series Kingdom Come (1996) that suggest Shazam goes nowhere. In the latter series, Billy has grown up to look exactly like his previously idealized self when in his non-powered state. While in the former, Billy is technically separated from Shazam only by his imagination creating a literally separate form. Therefore we can take this as evidence that there is not an actual physical body for Shazam.
Yet what about his mind? For this we can look at nearly any story found in Power of Shazam (1995-1999) and Justice League #1 (1987) and see that Billy is in control. It is just that the wisdom of Solomon tempers his immaturity so he is more logical and rational? (The comic event Legends [1986-1987] shows such an explanation)
So if Shazam is not a person, what is he? My guess is that Frank Miller’s Dark Knight Strikes Again (2001-2002) is right in suggesting that Shazam is nothing but a wish fulfilled. Though whether this is true or not is a concept future storytellers can explore.