The AI in Civilization is highly emergent.
Each unit or decision is make with without much of an overall plan.
Units can do things like group (which changes the unit of decision making), or change their AI state (but defender, attack, etc). The AI has a few global states, such as "zone target", "war strategy", "prepare for war", etc.
Other state that is kept track of is an abstract "win vs loss" value for a war, so that an AI is aware if it is crushing someone or being crushed by them, regardless of what it's estimate of each empire's total power.
Now, from this you do get results like "the enemy builds up troops, then goes to war, then crushes a few cities". Or, one AI decides to go to war with a weak person -- and everyone else joins in in a dog pile.
More emergent behavior happens in other resource allocation. The AI sets the value of various possible resources, then maximizes in each given city based on it's priorities.
The Trading AI is yet another component -- the AI keeps track of how much each other empire has done for them in the past, and then uses that to determine what trades to take at the current time.
The AI also uses exhaustive simulations (ie, explores the entire combat tree) to determine the victory chance of a given one-on-one combat. It also does approximations of this for faster situations, when it isn't making a "attack or not" calculation.
In effect, the AI in Civ is a bunch of heuristics and rough calculations. Each decision is made locally, with some relatively minimal global state and priorities to guide it. As Civ is a game where empires do emerge from the decisions of each city and unit, this works reasonably well.
Then there is the city site picker, which is again relatively isolated from the AI's overall strategy.
Players can beat this by macro strategies, and micromanagement that lines up with more macro state. From city specialization (which is pretty poor in the AI), to thinking about maps on a strategic level (choke points, etc), to building invasion forces and defending against invasions on an empire-wide level.
A good way I find of explaining these problems would be playing a copy of 1000 AD for BTS. By force concentration, a Chinese player can beat the Mongolian invasion by the AI. A Mongolian player can beat the Chinese similarly by force concentration. The Spanish human player can take out the Arab forces before the Arab forces fortify in Spain. Etc etc.
On top of that, the AI fails to generate the exponential power explosion of the industrial era, where production grows exponentially by constant re-investment. This is true in the ancient eras as well (lack of city specialization -- a human player will build a unit factory city using heroic epic in a well chosen location, while the AI doesn't have that level of strategy).
Now, how much of this is good or bad, I'm not certain. The AI should both play optimally, and roleplay. In Civ4, AIs have "attitude" towards other players, and treat their friends better than their enemies. This often isn't optimal, except of course because the other AIs also follow it.