When studying the demons of the Goetia, I frequently read that the main demon commands X number of legions of lesser demons. For example, from Black Witch Coven website, Dantalion commands 36 legions of lesser demons. #1 Is this true? #2 What do these lesser demons do?
Whatever their commander requires of them. Generally, when you call upon a high ranking demon, it is actually their legions that go out and bring your desires to pass, not the king or prince himself.
Think of the hierarchy like the military service. When a colonel (demonic king) is given a command by a general (you), they then pass it to their men (the legions under them) who then go out and accomplish it.
It’s important to note that “lesser” does not mean inferior or necessarily less powerful. The familiar given by Belial was able to help me with whatever I asked of him, and the Nether Lords under Azazel are extremely powerful in their own right, but choose to serve under him, for example.