I have a theory that ponies do it through two means.One, they have dijointed bones in their hooves that act similar to fingers, allowing them to distort and move their hooves in ways our horses can't.They also have specialized grooves similar to geckos along their hooves that can be activated with nary a thought.