They wired up a horse on a motion capture soundstage and galloped, walked and trotted it back and forth to get the basis for the animated horse movements. Then they put animated horses alongside real live horses in the final product. Neat stuff! So well done you can't even tell which horses are real and which are digitally rendered.
That is cool, and allows for them to film better action without risk of injury to horses or riders. The early days of Hollywood were not easy on equine actors and many bad things were done for the sake of a scene.
I saw how they do those video games that way. Wiring up humans to get the effects. Amazing technology.