You can rally attack on dungeon guardians and players' castles. Click on the enemy, then choose rally attack (for dungeons) or assemble for the expedition (for players' castles) 


 Initiating the rally allows you to choose the time to wait for your allies' troops to join. The troops will set off to the enemy when the time is finished. 
 
 You must build the Hall of War inside your castle to join or create a rally.