Ever accused someone of hypocrisy when that someone argued for a position you disagreed with? Well, you might be guilty of an "ad hominem," which is Latin for "[attack] on the person [making the argument]."
In my college introduction to logic course, we learned that ad hominems are irrelevant to the issue at hand. So, for example, if a professor who is wearing a leather jacket presents his argument about how we shouldn't be cruel to animals, the fact that he has purchased an article of clothing he didn't need (which, presumably, was made in a process cruel to the cow), it is irrelevant to point out the fact that that professor is a hypocrite. I.e., it is irrelevant to that professor's argument that we shouldn't be cruel to animals. If indeed we shouldn't be cruel, then his hypocrisy is no excuse to that argument.
So far, so good. But isn't the charge of hypocrisy relevant to some point? Maybe the fact that the professor is a hypocrite speaks to the feasibility and believability of all our protestations to the high ideals he claims to believe in.
Let's say that a moralist preaches up and down that adultery is bad and yet is found to be guilty of adultery. Adultery may be bad or not bad regardless of that moralist's peccadilloes. But his hypocrisy does speak to the very human difficulty in living up to that ideal.
Ad hominems are relevant, usually, to some argument. But they are fallacious when used to misdirect the argument in question.