Google for things like "Markov chains", "lexical analysis", "Natural Language", "Machine learning" as a starting point. The comp.lang.ai faq is perhaps a useful starting point, too.
Then realise how huge an endeavour this is!
Natural Language processing has been given some serious attention, and it is possible to get some OK results. But I can't say I've seen anything that's any more than just "OK".
There was _one_ account I read of a computer being able to "speak like a child", having been "taught from scratch"...but the article never went into details.
Last edited by Sais; 05/02/08 08:13 PM.