they are both territorial & get defensive if not trained properly; you will notice with a properly trained dog or cat that they couldnt care less about the others presence; elderly cats & dogs live peacefully together or at least tolerate eachother
Cats and dogs can get along just fine. It's not difficult, and the idea that cats and dogs fight exclusively amongst each other is just nonsense. They both are as likely to fight one another as they are to fight a squirrel, bird, or human.
If raised together, they're best pals. Most of the time, they're not getting along because they've never seen each other before. They are often larger or smaller than eachother, and dogs have a keen interest in playing with the cat, though they don't realize the cat can't play like they do. It's not that they don't get along, it's just that they are different. The dog wants to play, and so does the cat, but their ideas on playing are very different, therefore, the cat gets scared crapless when the dog tries to play with it. They get along just fine; both are just different.