This fallacy is also known as “against the man.” We all do it at some point. We hear something from a person we just cannot tolerate, and we don’t want to believe that something, even if the evidence says it’s true. When the crazy lady down the street says, “The sky is blue,” saying it must not be because she’s crazy doesn’t hold up. You have to look at the evidence of the claim.
That’s probably simplifying the issue a bit.
If you resort to insulting your opponent or calling into question an argument based on your opponent’s person, rather than the evidence, you’re committing an ad hominem fallacy.
I hear from creationists all the time that evolution cannot be true because Charles Darwin had a deathbed conversion to Christianity. First off, I haven’t seen proof of Darwin’s deathbed anything, let alone conversion. Secondly, what do his personal beliefs have to do with evolution? The theory of evolution has a great deal of science backing it up and does not depend on a “prophet” or “great thinker” to prop it up.
Another ad hominem example I can think up off the top of my head: Politician A and Politician B are debating. Politician A brings up Politician B’s divorce (gay child, teenage joint smoking, church membership, dancing style, favorite color, etc.) when the debate is about taxes. Obviously, Politician A isn’t arguing against the substance of Politician B’s tax plan. Politician A is trying to sway the audience opinion by associating Politician B with something the audience will find distasteful. Politician B, if s/he’s caught unawares, may fall into the trap of explaining or defending against the subject of the ad hominem.