The role of an AI is to look and act like a human, or even resemble something intelligent. Alan Turing shows this as the role of all AI (read about the Turing test and you'll know what I mean).

Why is this important in games? Well, you tell me... Which is more fun? killing a human in multiplayer or simply stopping a few lines of code from running (even if those lines are very hard to stop). Which should we aiming to be more like.

Bear in mind, the AI being researched in universities and labs to mimic human behaviour closely if of a very different breed to the AI you see in commercial AI. This being, commercial AI has to make money for the creators. Research AI has to be smarter than anything ever made before.

How to make one?

I don't have a step by step guide, but what advice I can give you is don't go in there without extensive, extensive planning. plan out all the states, what they do, how to get into them. This way all you do on the computer is translate what's on your plan (write it down!) into code.