What is the meaning of [There’s many a true word spoken in jest]

Remarks not meant to be taken seriously frequently turn out to be true. For
example:

> ‘That’s a nice car you’ve got there, Frank,’ said his friend.

> ‘Remember I said as a joke tha I’would buy myself a new one if I won the
pools? Well, this is it.’

> ‘Congratulations. That provers there’s many a true word apoken in jest.’