The proverb means that the best way to teach something is to demonstrate it with your own actions because example is better than precept.
To set a good example for others to follow, it’s important to practice what you preach. It implies that the best way to teach someone is by showing them how it’s done, rather than just talking about it.
The origin of the proverb can be traced back to the Bible. The proverb is derived from a phrase found in the book of Jeremiah (13:23):
Can the Ethiopian change his skin, or the leopard his spots? Then may ye also do good, that are accustomed to do evil.