Horses can read humans body language, even when the humans are strangers to them. They can differentiate between dominance and submission, and they are much more likely to approach people who are showing submissive behaviors. Submissive body posture is where one is relaxed and slouched over, with their legs and arms close to their body. A dominant body posture is where one is standing straight up with their legs and arms spread apart, taking up as much space as they can.
Horses can read your body posture, even if you have never met that horse before. This is why many horses will often either run from you or walk up to you and be friendly, even if you have never seen them until then.
There has been recent research done at the University of Portsmouth and the University of Sussex on horses approaching people showing different body language.
First, both groups of people people gave off a neutral body language, neither submissive nor aggressive, and they would give the horses rewards of food when they came up to them. However, even after this reward of food, horses were still much more likely to approach those people who gave off a submissive body posture than an aggressive one.
Through evolution, those who are on the side of the upper food chain have survived by using larger postures to intimidate and show dominance, which often works for more submissive animals and scares them off. It is not hard to reason, then, that horses have an instinct to shy away from aggressive postures, as they as a prey animal, not a predatory one. They seem to naturally understand that smaller, more relaxed postures mean that that person is not going to hurt them or attack them.
At the end of the trials, it was concluded that the horses went to the person showing the submissive posture each time, even if they knew the person giving off the aggressive body posture better. The horses did not prefer one person over the other, or one side more than the other, only what body language was given off.