If hostilities do not exist between both players, you must first issue a declaration of war and then wait eight hours. After this period has passed, both players will be officially at war for two days and may begin launching attacks. You can use the "Surprise Attack" Strategy to instantly declare war and attack a player. 
 
Both players must not be under Novice Protection (Their cities don't have a protective cover over them). 
 
The offensive side can organize a Hero-led army.  

Both players must be at war. 
 
If both players are in Alliances which are at war, they are not required to declare war before attacking.

 As long as their Alliances are at war, they will remain at war and can attack at any time.