You can view the miniboard of your arena defense formation on the lower side of the arena screen. Tap the [Edit] button to open the formation screen and to make changes. When other players challenge you, the hero and troops of your defense formation will face the battle.
You can only choose available heroes and troops when editing the arena defense formation. After you confirm the changes, it will save the formation and the battle bonus, the arena formation will not be affected later when you change the hero/troop state or the battle bonus.