City walls as befits the name, is a defensive mechanic on the cities helping to defend from attacking troops. These walls depend on your city’s level, the higher a city’s level is, the better the walls it has. Whenever you attack an enemy city, you need to make sure to take into account their city walls in addition to the troops inside. Scouting a city will help you get the exact defense value. The cooldown on city walls only affect the experience points it gives, not its defensive value.