So, officially, any animal accompanying you is a non-player character that should be run by the DM according to its loyalties, desires, and Intelligence score. Practically speaking, almost all DMs (in my experience, anyway) just let the player whose character the animal is attached to run that animal as well: the druid controls his animal companion’s turn, the paladin controls her mount’s turn, and so on.
Either way, in order to get an animal to do anything, you have to use Handle Animal, either to train an animal in a particular trick, or to “push” an animal to use a trick it hasn’t been trained in. Even when a DM allows the player to control the animal’s turn, the appropriate tricks should be used (and the appropriate rolls made, if necessary).
One of the tricks available to animals is Attack:
The animal attacks apparent enemies. You may point to a particular creature that you wish the animal to attack, and it will comply if able. Normally, an animal will attack only humanoids, monstrous humanoids, giants, or other animals. Teaching an animal to attack all creatures (including such unnatural creatures as undead and aberrations) counts as two tricks.
This is the trick you need to either train the animal in, or push it to use, in order to get it to trample enemies.
But, you will notice, the Attack description does not mention trample anywhere in it. That is because you do not have that fine a control over the animal. Rather, when told to attack something, the creature attacks to the best of its ability—this goes back to playing the animal per its loyalties, desires, and Intelligence score. Assuming the animal is well cared-for, and well-trained (either because it knows the trick or because the handler makes a good roll to push it), its attack should reasonably include any kind of attacks it is capable of—including trampling.
Now, what does that have to do with the Trample feat? Absolutely nothing. Trample is a feat that a rider can take to use a particular maneuver while mounted. In order to perform an analogous maneuver independently, the creature would use overrun—hopefully with the Improved Overrun feat—and attack normally.
Or if the creature is one of the particularly large creatures that has the trample special attack—things like razor boars and triceratops—it could and would use that. There is no way for a horse to gain that ability, however. Considering the existence of the Trample feat, though, a feat for the horse to take to get that ability wouldn’t be unreasonable. Having the horse use the Trample feat that someone else—who usually rides the horse—has, though, that would be weird. And this special attack seems much more appropriate to a feat than to a trick—the trick in question would still be Attack.