In order to pull the cart horse pushes the ground with its foot in the backward direction by pressing the ground. As a reaction of this force, the ground pushes the horse in forward direction. As a result the cart is pulled by the horse in the forward direction.