Plato has Socrates describe a gathering of people who have lived chained to the wall of a cave all of their lives, facing a blank wall. The people watch shadows projected on the wall from things passing in front of a fire behind them, and they begin to give names to these shadows. The shadows are as close as the prisoners get to viewing reality. He then explains how the philosopher is like a prisoner who is freed from the cave and comes to understand that the shadows on the wall do not make up reality at all, for he can perceive the true form of reality rather than the mere shadows seen by the prisoners.
Socrates remarks that this allegory can be taken with what was said before, namely the analogy of the sun and the analogy of the divided line. In particular, he likens our perception of the world around us "to the habitation in prison, the firelight there to the sunlight here, the ascent and the view of the upper world to the rising of the soul into the world of the mind".