What is the meaning of [A liar is not believed when he tells the truth]

He is the mischievous young shepherd who roused the village a number of times
by crying ‘Wolf!’ when there was no wolf. The time arrived when a wolf did
attack the flock, but nobody took any notice of his warning shouts of ‘Wolf!
Wolf!’