The first group of fallacies are fallacies of relevance: their premises have nothing to do with the conclusion, though they may stir feelings that make them seem to. The most famous one turns from the argument to the arguer.
Key idea
Attacking the person (ad hominem) rejects a claim by attacking the person who made it (their character, looks, age or motives) instead of answering the reasons they gave.
Why it works
A reason is good or bad no matter who gives it. If a messy student points out that many classmates walk to the library, the walking is just as real. Attacking the speaker leaves the reasons untouched, so the conclusion is no closer to being shown false.
Worked example: Spot the attack
"Dr. Lee has shown that the new bridge can hold twice the weight it needs to. But Dr. Lee is grumpy and never waves to the neighbors. So the bridge is probably unsafe."
- Dr. Lee's reason: the load tests.
- The reply attacks Dr. Lee's friendliness, which has nothing to do with the tests.
Answer: Ad hominem: the second sentence attacks the person, not the tests.
Questioning a witness can be fair. If someone claims to have seen the missing bike but was across town at the time, doubting their report is good reasoning: the question is whether to trust what they say, not whether their argument is sound.
Common mistake
Calling every criticism of a person ad hominem. It is a fallacy only when the attack is used in place of answering the reasons. When the question is whether to trust someone's report, their honesty and position are relevant.