That is left at GM discretion. But probaly the size of your hooves
According to James Jacobs (Paizo's Creative Director), when asked how can blink dogs be sorcerers (as they have no hands for somatic components), he answered that hands are only required for humanoid-like creatures and that another type of creature could use another part of their body to meet the somatic requirement:
If nagas can be sorcerers... I have no concerns or worries about blink dogs doing the same. Material components are the only things that are really a concern for handless spellcasters, and sorcerers get Eschew Materials for free.
For humanoids, somatic components include hand gestures. For things with other shaped bodies, somatic components include whatever gestures their body naturally makes, be that paw or leg movements, tail wagging, squirming bodies, or whatever.
However, what body part is left at GM discretion here. I don't recall any horse or pony-shaped NPC or monster in any of the books. The closest we got are kirins, unicorns and pegasi, but they all got spell-like abilities and not spellcasting abilities.
I personally can't imagine any other body part other than a horse's hooves to act as their hands for casting spells, so that is what I would use if you ask me. It is worth taking a look at the magic item body slots for unusual creatures and make a decision based on that, as it was designed for this kind of situation:
Additionally, GMs may use this table as a guide to determine what kinds of magical gear non-humanoid monsters can wear and use. Note that the rules in this section are merely suggestions, and ultimately it is up to the GM to decide what kinds of animals can use particular types of magic items.