Dogs and cats generally have different social styles. A dog is a social animal, which must exist in a hierarchal society while the cat lives an independent life, mostly outside of the lives of other cats or animals. With such different social styles, a dog and cat will misunderstand each other at the beginning, even if the dog has friendly intentions at the beginning.
When a dog first sees a cat, particularly if it has never seen a cat, it will go bounding up to the cat. The dog rushes to the cat with different social expectations than that of the cat. The dog will expect to be able to sniff at the cat’s hind end as a social exchange and the cat does not want any of that. Other social behaviors that the dog may do that will turn off the cat include the wagging tail.
The problem with the wagging tail is that its movement means different things to the dog and the cat. To the dog, the wagging tail is a social greeting that usually indicates happiness. To the cat, the wagging tail means displeasure and even anger. When the dog rushes to the cat with a wagging tail, the cat may interpret this as hostility. In return, when the dog sees the wagging tail on the cat, it may interpret this as a sign of friendliness when in fact the cat really feels hostility.
When the dog tries to sniff the cat, the cat may react by running off or attacking the dog. If the cat attacks the dog after the dog’s friendly or not so friendly approach, the dog’s attitude towards the cat and even other cats has been altered to the point where the dog may appear to hate cats.
Dogs may hate cats, particularly when the two animals misunderstand each other from the beginning. Not all cats and dogs hate each other. You can find photographic evidence and anecdotal stories about cats and dogs cuddling together and otherwise getting along.