Alliance Army is when the player participates in an attack or defense together with his guild members.
It can be an offense army, when you attack a single target with your guild members all together - we call this assembly or rally. In this case, the target can call other Guild members to join his defense team.
You can also be assemblied by an enemy, who will therefore attack you all together with their guild members. In this case, as in the other one, the members of your guild can help you defend yourself by sending troops to fight on your side.
When an assembly starts, you can join by sending up to 4 heroes and 4 brigades. Heroes and brigades bring troops. The number of troops you can send to an assembly is determined by the level of your hero only, nothing else. The grade of your hero does not impact the assembly whatsoever as long as you are not the assembly leader.
The total number of heroes and brigades a Guild can put together depends on the initiator Battle Hall level. It is important to note that a hero allows you to bring more troops than a brigade does. But every hero and every brigade you bring takes up a spot in the Assembly Battle Hall. As those spots are limited, the guild might opt for only sending heroes (in this case, more people can join too). The number of troops you send is very important when you are fighting against an enemy with similar war stats.
Joining an assembly forces you into battlespace, meaning you can't shield for 15 minutes. This makes you a perfect target to be attacked. When an Assembly starts, it doesn't matter if is enemy attacking you or you attacking the enemy, all guild members on both sides will be able to find the exact location of the assembly initiator and the target enemy on the world map, just by taping on their name.
Therefore, if an assembly is started against you, there are two things you can do: fight or protect yourself. If you want to fight, call your guild mates to send troops to your City. If the enemy is much stronger than you, either the initiator or their guild mates, you might want to protect yourself. In this case, go back to the hive, try to hide as many troops as possible by stationing them with shielded guild members, starting a ghost assembly*, sheltering (always shelter your leader) or making marches walk for very long time. You should be able to hide more than 1M troops this way. You should as well send whichever resources over capacity to Guild Bank so you won't loose them when attack happens. All those hints are valid for solo attacks too.
Regardless of whether you are in risk to be soloed or assemblied, as soon as you take off your shield you need to be running an anti-scout to hide your army size. Save your army size boost for important assemblies and the Fort Wars.
OBS: Ghost Assemblies are assemblies against a weak enemy, created just to hide troops, since once an assembly is created the troops selected will leave the castle.