Plato relates the Allegory of the Cave toward the end of The Republic, his treatise about the ideal state. It explains his ideas about the difference between enlightened and unenlightened men and argues for the rule of enlightened men in his republic. The allegory details the education of these ideal rulers and is often extracted to illustrate Plato's ideas about the nature of reality.
The Allegory is persuasive and beautiful in its brevity and well worth reading.
Prisoners are chained in a cave, facing the wall. They are constrained so they cannot turn their heads and have been confined in this manner since childhood. The cave is underground, and an arduous passage leads to the sunlight. Behind the captives, a fire burns. In-between the fire and the captives is a parapet, a sort of puppet stage blocking some shadows. Behind this stage, where the prisoners cannot see them, men walk along a track, carrying objects that resemble people, animals and things, but none are not living or real. Some carriers speak to one another, and some are silent.
The captives cannot see one another. they see only shadows thrown on the wall. They cannot hear the real speech of the carriers as it is distorted by the echoing cave. Yet this reality is all the captives have ever known. They believe the echoes of speeches not made to them embody real speech, and that shadows thrown by imitation objects are the things themselves.
If one prisoner were suddenly freed, he would be dazzled, blinded by the dancing light as he turned. If he saw the imitation objects, he would think them illusions, knowing only the shadows on the walls for the reality. If a captive gazed at the fire itself, he would turn away to rest his eyes on the comfortable shadows.
If he were dragged into the daylight, he would find the journey a rough and would only be blinded by the full light. It would be better to grow used to the light slowly. Let a man gaze on reflections first, says Plato, and only later on objects themselves. Let him look at the sky by night, before he tires his eyes on the sun.
One day he could gaze at the sun unemcumbered. Then he would see how the sun rules the seasons, the world's course and our little lives. He would see the power of the sun and how it makes life possible. Of course, if he returned to the cave he would be confused in the darkness. He might even be thought mad or dangerous, and his former fellows might kill him.
People see things as they appear, but philosophers see them as they are. The ascent to the upper world is the ascent of the soul, and it grows slowly toward the sun. The Form of Goodness is the highest and truest reality. Most will never know it.
However, the philosopher king of Plato's republic will know the truth. They will be confused when they first come into the light and again when they return to darkness to serve, but they will make the republic the highest and greatest state.
Plato says the best state must teach its leaders to contemplate the highest good, so those leaders will not quarrel about shadows or long for power. So educated, philosopher king will want only a life in the light of truth. To serve is a sacrifice, and they rule without taking joy in their power.