Plato tells the parable of life in a cave in order to show by way of
analogy the true nature of reality. This parable occupies the opening
lines of Book 7 of the Republic, translated by Benjamin Jowett:

"And now, I said, let me show in a figure how far our nature is
enlightened or unenlightened: --Behold! human beings living in a
underground den, which has a mouth open towards the light and reaching all
along the den; here they have been from their childhood, and have their
legs and necks chained so that they cannot move, and can only see before
them, being prevented by the chains from turning round their heads. Above
and behind them a fire is blazing at a distance, and between the fire and
the prisoners there is a raised way; and you will see, if you look, a low
wall built along the way, like the screen which marionette players have in
front of them, over which they show the puppets.

I see. 

And do you see, I said, men passing along the wall carrying all sorts of
vessels, and statues and figures of animals made of wood and stone and
various materials, which appear over the wall? Some of them are talking,
others silent. 

You have shown me a strange image, and they are strange prisoners. 

Like ourselves, I replied; and they see only their own shadows, or the
shadows of one another, which the fire throws on the opposite wall of the
cave? 

True, he said; how could they see anything but the shadows if they were
never allowed to move their heads? 

And of the objects which are being carried in like manner they would only
see the shadows? 

Yes, he said. 

And if they were able to converse with one another, would they not suppose
that they were naming what was actually before them? 

Very true. 

And suppose further that the prison had an echo which came from the other
side, would they not be sure to fancy when one of the passers-by spoke
that the voice which they heard came from the passing shadow? 

No question, he replied. 

To them, I said, the truth would be literally nothing but the shadows of
the images.

That is certain. 

And now look again, and see what will naturally follow if the prisoners
are released and disabused of their error. At first, when any of them is
liberated and compelled suddenly to stand up and turn his neck round and
walk and look towards the light, he will suffer sharp pains; the glare
will distress him, and he will be unable to see the realities of which in
his former state he had seen the shadows; and then conceive some one
saying to him, that what he saw before was an illusion, but that now, when
he is approaching nearer to being and his eye is turned towards more real
existence, he has a clearer vision, -what will be his reply? And you may
further imagine that his instructor is pointing to the objects as they
pass and requiring him to name them, -will he not be perplexed? Will he
not fancy that the shadows which he formerly saw are truer than the
objects which are now shown to him?

Far truer. 

And if he is compelled to look straight at the light, will he not have a
pain in his eyes which will make him turn away to take in the objects of 
vision which he can see, and which he will conceive to be in reality 
clearer than the things which are now being shown to him? 

True. 

And suppose once more, that he is reluctantly dragged up a steep and
rugged ascent, and held fast until he is forced into the presence of the
sun himself, is he not likely to be pained and irritated? When he
approaches the light his eyes will be dazzled, and he will not be able to
see anything at all of what are now called realities. 

Not all in a moment, he said. 

He will require to grow accustomed to the sight of the upper world. And
first he will see the shadows best, next the reflections of men and other
objects in the water, and then the objects themselves; then he will gaze
upon the light of the moon and the stars and the spangled heaven; and he
will see the sky and the stars by night better than the sun or the light
of the sun by day? 

Certainly. 

Last of he will be able to see the sun, and not mere reflections of him in
the water, but he will see him in his own proper place, and not in
another; and he will contemplate him as he is. 

Certainly. 

He will then proceed to argue that this is he who gives the season and the
years, and is the guardian of all that is in the visible world, and in a
certain way the cause of all things which he and his fellows have been
accustomed to behold? 

Clearly, he said, he would first see the sun and then reason about him. 

And when he remembered his old habitation, and the wisdom of the den and
his fellow-prisoners, do you not suppose that he would felicitate himself
on the change, and pity them? 

Certainly, he would.

And if they were in the habit of conferring honours among themselves on
those who were quickest to observe the passing shadows and to remark which
of them went before, and which followed after, and which were together;
and who were therefore best able to draw conclusions as to the future, do
you think that he would care for such honours and glories, or envy the
possessors of them? Would he not say with Homer:
"Better to be the poor servant of a poor master, and to endure anything,
rather than think as they do and live after their manner?" 

Yes, he said, I think that he would rather suffer anything than entertain
these false notions and live in this miserable manner. 

Imagine once more, I said, such an one coming suddenly out of the sun to
be replaced in his old situation; would he not be certain to have his eyes
full of darkness? 

To be sure, he said. 

And if there were a contest, and he had to compete in measuring the
shadows with the prisoners who had never moved out of the den, while his
sight was still weak, and before his eyes had become steady (and the time
which would be needed to acquire this new habit of sight might be very
considerable) would he not be ridiculous? Men would say of him that up he
went and down he came without his eyes; and that it was better not even to
think of ascending; and if any one tried to loose another and lead him up
to the light, let them only catch the offender, and they would put him to
death.

No question, he said. 

This entire allegory, I said, you may now append, dear Glaucon, to the
previous argument; the prison-house is the world of sight, the light of
the fire is the sun, and you will not misapprehend me if you interpret the
journey upwards to be the ascent of the soul into the intellectual world
according to my poor belief, which, at your desire, I have expressed
whether rightly or wrongly God knows. But, whether true or false, my
opinion is that in the world of knowledge the idea of good appears last of
all, and is seen only with an effort; and, when seen, is also inferred to
be the universal author of all things beautiful and right, parent of light
and of the lord of light in this visible world, and the immediate source
of reason and truth in the intellectual; and that this is the power upon
which he who would act rationally, either in public or private life must
have his eye fixed. 

I agree, he said, as far as I am able to understand you.

Moreover, I said, you must not wonder that those who attain to this
beatific vision are unwilling to descend to human affairs; for their souls
are ever hastening into the upper world where they desire to dwell; which
desire of theirs is very natural, if our allegory may be trusted. 

Yes, very natural. 

And is there anything surprising in one who passes from divine
contemplations to the evil state of man, misbehaving himself in a
ridiculous manner; if, while his eyes are blinking and before he has
become accustomed to the surrounding darkness, he is compelled to fight in
courts of law, or in other places, about the images or the shadows of
images of justice, and is endeavouring to meet the conceptions of those
who have never yet seen absolute justice? 

Anything but surprising, he replied. 

Any one who has common sense will remember that the bewilderments of the
eyes are of two kinds, and arise from two causes, either from coming out
of the light or from going into the light, which is true of the mind's
eye, quite as much as of the bodily eye; and he who remembers this when he
sees any one whose vision is perplexed and weak, will not be too ready to
laugh; he will first ask whether that soul of man has come out of the
brighter light, and is unable to see because unaccustomed to the dark, or
having turned from darkness to the day is dazzled by excess of light. And
he will count the one happy in his condition and state of being, and he
will pity the other; or, if he have a mind to laugh at the soul which
comes from below into the light, there will be more reason in this than in
the laugh which greets him who returns from above out of the light into
the den. 

That, he said, is a very just distinction."