To move indoors with your mount, or to pass heavy undergrowth for example, you might have to 'lead' your horse (or warg or whatever). Typing "lead" while riding will automatically make you dismount and lead your mount. Use "dismount" if you want the mount not to follow you.
If you are not riding and you type "lead" without any parameters, you will try to lead any mount in the room that you have previously been riding. Similarly, typing ride with no argument will cause you to mount the animal you are leading, if possible.
It is also possible to lead mounts that you previously haven't ridden if you specify which one you want to lead (like "lead horse"). This won't work if someone else in the room is leading or riding the mount already.