The general is the highest-ranking member of the mostly-unrealized, civilization-wide dwarven army, responsible for determining military strategy as well as the appointment of lieutenants and captains. The general commands the lieutenants, who in turn command the captains. The general arrives alongside the monarch.
In the current implementation, there does not seem to be anything special about the general. There are no squads under the general's control.
Human and goblin civilizations occasionally have generals as one of their variable positions, but they aren't guaranteed.
Elves additionally have the princess role, with the same functions and likewise appointing ranger captains. Despite the name, the position is not inherited, instead appointed by the druid. However, the princess is defined as the successor to the queen.