Ponies were small horses and were a comparably smaller breed of riding animal than horses.
Ponies were ridden and used for the baggage by Thorin and Company throughout their journey to the Lonely Mountain, of which some were lost and granted by others such as Beorn. Bilbo made the use of one strong pony to carry his modest share of the reward promised to him for services rendered on the Quest.
The Lord of the Rings
Several ponies are featured in The Lord of the Rings, mostly ridden by the Hobbits (due to the simple fact that ordinary horses were too large for them). The most notable pony in the story was Bill. He was acquired by Frodo and Company, at an unfairly high price (Bill was, at the point, a very weak pony), from Bill Ferny in Bree. He would later accompany them to Rivendell, partially up the Mountain through the Redhorn Pass, up and to the West-gate of Moria where with the attack from the Watcher in the Water and the perils of Moria he was released into the wild. He eventually made it back to Bree.