Imagine that you are standing on the sidewalk on a sunny day. You turn so that the sun is at your back. You look down and see your shadow cast upon the sidewalk.
Now imagine that you are standing on a mountain side. Your climb started out in the foggy lowlands, but you have climbed above the fog (or low-lying clouds) and now stand in the sun. You turn so that the sun is at your back. You look down and see your shadow cast upon the fog below you.
A few weird things happen. For one thing, because your shadow is being cast on fog instead of a solid surface, it's hard for your brain to compute where the shadow actually is. It can seem both far away and very close, because the shadow on the fog particles throws off your depth perception.
For another thing, because of the angle of the light and the depth of the fog, your shadow is distorted into a triangular shape. It seems very wide at the feet, and very narrow at the head. This can give the illusion that the shadow is very tall, like a giant striding along beside you.
Just to make things a little more unsettling, diffraction often causes a halo or circular rainbow to appear to encircle the head of the figure, like the holy glow on a Renaissance painting of baby Jesus.
This phenomenon is well known to people who spend a lot of time in the mountains. (Its name comes from the German word Brockengespenst, coined by the people who live near the mountain Brocken.) But it can be startling to visitors, to whom it seems almost an apparition appearing below or beside them in the mist.