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.
Large-scale wars can erupt from contesting over common Holy Sites or other common objectives.
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 Building Durability I, Building Durability II and Conqueror Alliance Technology respectively. Burning structures can be stopped using gems once every 15 minutes.
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 city's garrison will be a mixture of all troops currently within the city.
Rally capacity can be increased through commander leadership talent, some commander skills, and alliance technology, and rallies may also be reinforced while they are marching to and when attacking a target. Rallies themselves can also be rallied, such a rally is known as a counterrally.
The attack of troops on alliance territory can also be buffed through Territory Guardian I and Territory Guardian II alliance technology. The march speed of troops on alliance territory can also be increased through Rapid March I and Rapid March II alliance technology. The march speed of rallied troops can be increased through Assembly Charge I and Assembly Charge II alliance technology.
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.