The clearest way to see why this fails: a chain-smoker telling you smoking causes cancer is still right. Their hypocrisy is genuine, irritating, and completely irrelevant to the epidemiology. An argument's truth is determined by evidence and logic, not by the virtue of whoever happens to be voicing it.
The fallacy comes in recognisable varieties. Abusive ad hominem is the blunt form — dismissing a claim by insulting its author. Tu quoque ("you too") points at inconsistency: you say I should be honest, but you lied last week. Circumstantial ad hominem cites interests or affiliations: of course she says that, look who funds her. Each substitutes a fact about the speaker for an engagement with what was said.
Here is where the honest treatment gets more interesting than the usual list-of-fallacies version. Attacking a source is not always fallacious, and pretending otherwise leaves you defenceless. When someone offers testimony rather than argument — "trust me, I saw it" — their reliability is precisely the issue, and a record of dishonesty is directly relevant. When an expert has an undisclosed financial stake, noting it is legitimate: it does not prove them wrong, but it tells you how much independent verification you should want. The line is whether the person is offering reasons you can evaluate yourself, or asking you to take their word.
It is also worth separating a fallacy from mere rudeness. "Your argument fails because of X, and frankly you should have known better" contains an argument plus an insult. That is unpleasant, not fallacious. The fallacy occurs only when the attack does the work that reasoning should have done — when nothing but the insult stands between the claim and its dismissal.