Plato writes the allegory as a conversation between his mentor, Socrates, and one of Socrates' students, Glaucon. In it, Socrates describes a group of prisoners who have lived chained to the wall of a cave for their entire lives, unable to move their heads. Day in and day out, they watch shadows projected on a blank wall from things passing in front of a fire behind them. This is their entire reality—they give names to the shadows and assume they're real, never questioning that they might come from another source.
But imagine, Socrates says, that one prisoner is suddenly freed and allowed to turn his head. Once he looked at the fire, the light might hurt his eyes, and he'd be disoriented at the fact that the shadows he had believed were real were just illusions cast by the fire. If he left the cave and walked into the sunshine, things would get even more confusing. The sun would be even brighter than the fire, and he might even see reflections of himself in a nearby body of water. What would he think of his companions back in the cave, Socrates asks? He'd probably pity them for living in such a tiny sliver of reality. If he came back to the cave and told them about it, they'd probably think he was crazy.