A Horse (Equus caballus) is a large hoofed mammalian quadruped originally from Earth. Humans have used horses for centuries as a means for transportation by Humans. However since the rise of the automobile, airplane, and other means of transportation in recent centuries horseback riding has for the most part become solely a recreational activity.
When the Skagarans kidnapped humans from Earth in the mid-19th century, they also took a number of horses as well. Both the humans and the horses were taken from Earth by the Skagarans and resettled on a planet in the Delphic Expanse. After the humans overthrew the Skagarans, horses were still used as transportation by this group of humans until at least the mid-22nd century when the Enterprise NX-01 encountered them. Both Charles Tucker and T'Pol acquired horses for riding while secretly investigating the settlement, although T'Pol had some difficulty with her horse. (ENT episode North Star)
In the 2220s, teraformer Heston Prescott transported a number of horses and frozen horse embryos from Earth to the colony world of Elysium. It was his intent to introduce horses to that world, which had no native quadrupeds similar to horses. He was able to implant several of the embryos into the mares which he had brought, which were able to carry their young successfully to term. One of the young horses born on Elysium was a bay colt which Heston's stepson Christopher named Tango. Later when Heston and Christopher's mother Willa McKinnes died in a large fire in 2231, Charlie Pike brought Tango and Christopher back to Earth. When the Talosians tried to convince Captain Pike to remain with them, they once used an illusion of Tango. Tango would remain on Charlie's farm for the rest of his life, dying shortly after Spock took Chris to Talos IV in 2267. (TOS episode The Cage and novel Burning Dreams).
James T. Kirk had an uncle who owned a farm in Idaho. This farm had several horses. Kirk would often ride his uncle's horses through the nearby countryside and both he and the horse would often jump a large chasm, an act which Kirk admitted "scared the hell" out of him each time. During one of these horseback rides Kirk met Antonia in 2282, this was before returning to teach at Starfleet Academy. Kirk revisited the farm while trapped within the Nexus. Kirk jumped the large chasm, but then realized that this time he did not feel fear. This led him to realize that what he was experiencing wasn't real, and opted to leave the Nexus with Jean-Luc Picard. (TNG movie Star Trek: Generations)
During the 24th century, the holodeck on board the Enterprise had a number of programs with riding horses. Captain Picard enjoyed horseback riding and actually had his own saddle aboard the Enterprise. (TNG episodes Suddenly Human, Pen Pals, and Starship Mine).