If you're getting attacked by another lord, you can either move your troops on the attacked city to defend it or upgrade the city to destroy your opponent's troops with the city's walls.