AI behavior run the gamut of smug, to belligerent. Friendly to cranky.
Granted in Civ3, you can pretty much 'deal' with any AI given enough incentives for them to trade with you, (unlike what they did in Civ4, which I never really liked) but AI behavior is usually best when youi're middle of the pack or running 2nd to a larger AI.
Once you become #1, the AI will justifiably see you as their #1 threat and you can only keep a Civ at borderline polite with very good deals. This usually means its a Civ you're actively supporting or keeping in your pocket for geopolitical/strategic reasons.
If you're last or near last in the pact, the AI will invade and dogpile.
Also, AI gets a bit more eager to go to war after Nationalism or long periods of peace where they get to build up a large military.
--------------------------------------------------------------------------------------------------
On Invasions by sea:
I also generally disagree with the 'AI is bad at invading' dogma. It's not very impressive in Vanilla and PTW, but C3C has an entire scenario built around the war in the pacific and the AI's naval capabilities had been improved to a point where It's only reliably worse in doing it than a newbie human (which is high praise!). But there's also quite a bit of self selection going on to start. Players who don't do well usually don't play far enough to be invaded by sea (assuming it's a continent's game or they're stuck on an island). The issue is if a human player wants to stick around long enough with such an AI in the game, and 2nd, the human footprint is often so large that in games where such an AI could develop, they do not as they're cut down to size early.
Large AIs, can mount impressive naval invasions, supported with naval and air power (if its a late game invasion) as well. It's not simply landing a galley with 2 units.
And lastly, there's the confusion with another AI strategy. During the Vanilla Civ3's final patch in early 2002, Firaxis snuck in new AI strategy which allowed it to sneak a small landing force, usually some piddly defender, by boat, as far away from the front as possible, usually into the core cities to pillage, disrupt and cause panic. Initially this worked, and it still works enough that most players keep a small reserve force to deal with them, but on Cheiftain or in cases where the players enjoy significant superiority, these suprise attacks tend to fall a bit flat which had led to the wrong association with botched naval landings.
You'll see a large scale naval landing when it comes, they usually don't happen until after magnetism when the AI gets galleons and frigates and build them en masse.
And here's the final catch. The AI's behave differently between each game. Some AI are land powers and have no navies to speak of, some develop an affinity with the sea and builds a lot more ships. A runaway AI can be both, but it's also somewhat more rare to find an AI that is both a land and sea power at the same time. So in any given game (on a standard map), there may only be one or two AI out of the 7 or so in the whole game that develops an affinity with the sea. So it's not like you'll be deluged with naval invaders from all tribes of the world as soon as they get magnetism.
Granted all bets are off in the modern era. Any sufficiently large AI will engage in an arms race *F3 military advisor* as they try to match the top Civ ship to ship.