Ad hominem fallacies involve attacking the person rather than the argument, e.g., by casting aspersions on that person's character, or associating the person with a distasteful ideology.
This is a logical fallacy because the fact that a person is repugnant does not mean that they are wrong.
The Ad hominem attack is frequently associated with the Argument to spite, which is only associating the opposition with distasteful ideology, whilst the Ad hominem include attacks on the opposition. For an argument to spite, attacks are unnecessary.
- Elizabeth claims that John murdered Sally
- Elizabeth is a convicted drug user
- Therefore Elizabeth's claims aren't trustworthy
- Bob says that the sky is blue.
- Bob is a communist, and cannot be trusted.
- Therefore, the sky is not blue.
Note that not every use of a personal remark qualifies as an ad hominem (or it does not qualify as a fallacy).
Joseph Smith claimed to have received divine revelations and an additional gospel. However, he had no evidence of substantiate his claims. Therefore, his credibility is a legitimate topic for discussion since it has a bearing on the authenticity of the Book of Mormon.
You'd have to be an idiot to believe the earth is 6000 years old.
In the case of the first sentence, a personal insult was used. However, the reason for the insult was based on the arguments being made. Furthermore, the insult follows from the disagreement, not the other way around. An ad hominem is generally a non sequitur. The argument technique used is overly emotional and the assertion of idiocy may be wrong, but it is not ad hominem.
Then there is this sort of argument.
This is also a personal remark (about Dembski), yet it is directly relevant to the subject of the argument. Since Dembski is often used as a source of argument from authority, it is certainly relevant to question his credentials. A person who has not studied science is, indeed, less qualified to act as an authority about evolution.