A cat faces two choices when confronted with a dog. It can stand its ground and fight, or it can take flight and run away. If the cat is cornered or guarding its young kittens, it might elect to fight. A standoff is usually normal if a cat is familiar with a particular dog, like if it's the family dog the cat was raised with. However, flight is the general rule because a dog is much stronger than a cat, and it stands a much better chance at survival by escape.
Cats are highly intelligent.
They know numerous hiding places and the most accessible escape routes in their territories. If they are suddenly confronted, they will know where to go. If a small hiding place is not immediately available, they will seek a high place because cats know dogs cannot climb. Trees remain a natural choice for cat escape unless they are in a desert or a deforested area. But a cat up in a tree does not always warrant a rescue.