Horses (Equus caballus) are a species of large hoofed mammalian quadruped which originate from Earth. Humans have used horses for centuries as a means for transportation, 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 which with the humans were resettled on a planet in the Delphic Expanse. After the humans overthrew the Skagarans they continued to use their horses as transportation until at least the mid-22nd century when they were discovered by the crew of the starship Enterprise NX-01. 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. Years later when the Talosians tried to convince the then Captain Christopher Pike to remain with them, they 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 novel: Burning Dreams & episode: "The Cage")
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 would often jump a large chasm, an act which Kirk admitted "scared the hell" out of him each time. In 2282, during one of these horseback rides Kirk met Antonia, 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: 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", & "Starship Mine")