What is the meaning of [A burnt child dreads the fire]

“Somebody who has had an unpleasant experience thereafter shrinks from the cause of that experience.”