The most common reason for intolerance between dogs and cats is because similar signals have different meanings. For instance, cats show they deepest affection by raising the tail when in dog's world this is a sign of confidence, dominance, aggression... In any case, it does not represent a signal that shows considerable courtesy. Except that, some specific ear, tail, body movements and hair appear confusing. For instance, a cat that is frightened bristles its hair, bends its back and raises its tail when a frightened dog also may bristle, bend its back but he tail is completely down, even between its legs.
A cub and a kitten are the easiest to adjust to living together because by growing up together they resolve their misunderstandings by learning each other's signals. Joining grown cat and dog is much more difficult. Animals should be supervised. If things get out of control, the best is not to get involved. The simplest way is to distract them in heir quarrelling: sprinkling or splashing them with water, throwing a blanket, coat or something similar over them.
During adjustment period, they will probably sleep away from each other, but with developing mutual trust they will start sleeping in the same room, and also with time they will learn each other's signals meanings.
Cats purr only in presence of other living beings, while dogs wag their tails only in presence of other living beings.