The position of the head can tell a lot about animal's intensions. Pointy dog head sends clearer signals than a blocky one.
A head directed at another specimen, whether it is a dog, a cat, a human or another animal... can mean that the dog wants to dominate or to attack, but it does not have to, since the direct stare must be taken in consideration with other signals coming from other body parts, above all ears, eyes, tail, body posture... If they are dominant the intension is surely to dominate or even show some form of aggression. On the other hand, if it is someone they know or have positive memory of, the dog will approach directly with relaxed body and movements that signify joy.
A dog turns its head away from the specimen when:
1. The goal of approach and getting to know each other is without aggressive intensions
2. There is desire to show submissive or frightened dog that they are peaceful
3. Approaching another dog there is no desire for conflict
4. There is no desire at all for the encounter