Truth does not change, but reality does. What a person perceives to be reality is typically also seen as being true. Most people will accept that because there is not any other explanation or alternative known to them, as is the case in the allegory. Before the prisoner becomes enlightened, he accepts the philosophy of the cave. After he sees and adjusts to the light, he sees the whole picture. The cave and the shadows are real, but the explanations he had for why they existed are not correct. By leaving the cave, the man sees the truth and understands what causes the shadows.
Reality is merely the what of existence, while truth gives the why. Since reality is in some ways the effect of truth, it is not very shocking when reality changes. It is the light, or the truth, that blinds the man as he leaves the cave. The concept of light changes everything the man understands about the world. Light cannot change, the underlying reason for why things happen the way they do does not change either.
Philosophy is a search for the truth. The ancients wanted to know why things happened, why reality is the way that it is. That basic quest for truth has led to many theories and explanations. This ongoing process of trying to define the truth is put figuratively in the allegory of the cave. As a student learns a new idea that explains the universe, he struggles to grasp it. After a certain point, the student cannot go back to his former way of thinking. The thought is truth, the concept is truth. Everyone knows that objects will fall towards the ground, but the idea of gravity is the truth behind it. And ultimately, science, philosophy, religion, and all those subjects imperfectly convey the truth behind reality. Humans may never fully understand the truth, but they do seem to be moving towards the light.