It's one thing to know that you're supposed to do; it's another thing to actually do it. This distinction -- knowing versus doing -- is an easy one to recognize, but it often gets lost in the heat of political debate.
We have an obligation to do two things: to learn the difference between right and wrong (that is, to be a moral authority), and to do what is right and avoid doing what is wrong (that is, to be a moral exemplar).
Being a moral authority is not easy, because there are many different moral considerations, and they sometimes pull us in different directions, and because it's not always easy to predict the world and how it behaves or responds to our actions. The answers to moral and political questions are often vague.
But we can nonetheless do much to increase our understanding of the different moral considerations and dilemmas we face, even if it is difficult to come to clear and uncontroversial moral answers in every situation.
We should do the right thing -- that is, be moral exemplar -- in part to avoid doing anything wrong, but also to set a good example. Our conduct should inspire others to see that doing the right thing is possible, manageable, and feasible (ideally, that it can be done with a smile and without regret).
Our knowledge is supposed to inform our actions: we're supposed to do what we think is right, and not do what we think is wrong. But, of course, we sometimes fail to do this. We either do something we believe we shouldn't have done, or don't do something we believe we should have done. In other words, we fail to practice what we preach.
This often results in charges of hypocrisy. And, certainly, saying one thing while doing another is an inconsistency that needs to be resolved. But we shouldn't immediately conclude that because someone doesn't practice what they preach means that what they preach is false. Somebody might be failing as a moral exemplar, but that doesn't mean they're failing as a moral authority.