Heroes and units can be grouped into an army so that they will move as one. Armies are formed by ordering units to follow another unit. When units are following certain heroes, they will also gain a Buff.
To gather units into an army, select the unit you want to be the leader and press the button next to Followers. To ungroup, press the button. You can also slide each unit in the Followers or Other Heroes & Armies List left to select to group/ungroup each individually.