According to Newton's First Law a body remains in its state of motion or rest until an external force acts on it.
So, theoretically, once a horse pulls a cart, the cart should move forever.
But in this case the horse has to continously extert the force to move the cart, this is because the force of friction is acting against the motion of the cart which is opposing its motion.
So the horse has to apply force to overcome this force of friction.
So , the horse excerts a constant force inorder to overcome the friction , so as to move continuously.