This page explains the various aspects pertaining to War in Rise of Kingdoms. (This page has the alliance category, but pertains to everyone.)
"War" is only specifically mentioned by the Castle, as when it is checked when no rally is in force, it describes that "everyone is happy and satisfied, so there is no war". In that respect, governors, and alliances make decisions that define war.
Therefore, anything requiring a rally by that logic would be a state of conflict. Rallies can be made against player cities, Barbarian Forts, Holy Sites, and passes by alliances, and Lohar camp spawns.
Other pretenses of war with players can include the scouting or burning of alliance buildings/structures, the attacking of gatherers and other armies in open-field combat, or attacking cities.
A structure loses durability and begins to burn after being attacked by an army. Any burning structure (city Wall, alliance flags, alliance fortresses) can be repaired (for walls, 500 every 30 minutes, alliance structures over time when repaired by an alliance officer [rank 4] or leader). If a burning alliance structure is left unattended, it will stop burning after a period of time. The durability of allied structures and the rate at which enemy alliance structures burn can be increased through Alliance Technology.
Watchtowers attack belligerents when a city is attacked, and absorb a portion of damage to the stationed garrisoned troops and reinforcements in the city. Both of these effects deteriorate as the watchtower health decreases from attack. Watchtowers recover their health out of combat over time.
If both the Watchtower and the garrisoned troops are defeated, the Wall will start to burn. If the wall is burned to zero durability, the city will be randomly teleported without consuming a teleport.
When an alliance structure is burned to 0, it is destroyed.
Troops can reinforce structures and cities and is limited by the structure or city's reinforcement capacity. The reinforcement capacity of a city can be increased by upgrading the City Hall. Troops selected to be part of the garrison will be a mixture of all troops currently within the city.
If the primary garrison commander has the garrison talent, buffs can be provided also to the watchtower and wall. For more on the fate of troops, please see the full breakdown of the treatment of the wounded on the Hospital page.
Kingdom versus Kingdom (KvK)
For more on KvK, see the Lost Kingdom.