See here: http://plover.net/~bonds/adhominem.html
Example:
A: "All rodents are mammals, but a weasel isn't a rodent, so it can't be a mammal." B: "I'm sorry, but I'd prefer to trust the opinion of a trained zoologist on this one." B's argument is ad hominem: he is attempting to counter A not by addressing his argument, but by casting doubt on A's credentials. Note that B is polite and not at all insulting.