What did Descartes mean by saying "I think, therefore I am?"

Here's a simple (maybe even simplistic!) answer: "I think" is Descartes's first axiom. "I am" is his first theorem. Descartes was seeking propositions that could not be doubted. He determined that the most indubitable one was "I think", on the grounds that, even if he were being deceived and was not really thinking—if, that is, he only thought that he was thinking—then he was still thinking! (Either I am really thinking or I only think that I am thinking; in either case, I am thinking.) He then decided that he could derive from that starting point (that axiom) the proposition that he, who was thinking, must exist in order to think. Some of his critics have suggested that a more cautious "theorem" to derive from "I think" is: thinking is going on (not necessarily that he is thinking or that he who thinks exists).

I remember reading that Descartes considered animals as nothing more than automata incapable of experiencing pain because they do not possess "souls" (define that!). Viewing this favorably you could say he was an intellectual living in a rarefied world of his own, simply a product of his age. Less intelligent people of his time, however, liked, say, dogs and understood that if you kicked them and they howled and ran away then they were experiencing pain. Was there something the matter with Descartes and his view of animals if he couldn't make this simple connection, so clearly cognate with the human experience of pain? I know Hume had problems with causation but surely not in such a painfully obvious empirical manner!

Actually, it was because Descartes thought that animals lacked language and reason that he believed they were mere automata. (I say "mere", because we need to leave open the option, supported these days by, e.g., Daniel Dennett, that we are automata!) As for "experiencing pain", we need to distinguish between actually feeling pain and (merely) exhibiting pain behavior. An automaton can do the latter; whether or not it can also experience pain is a separate question. Consider a computer outfitted with a pressure-sensitive device connected to its operating system and an operating system that can be in one of 3 states. It begins in the "super-user-friendly" state and greets me with "Hi Bill; what can I do for you today?". I ask it to open my word processor so I can edit my philosophy essay on Descartes. It says, "Sure thing! Here ya go!". I edit for a while, and then hit its pressure-sensitive device very hard. This causes it to go into its "normal" state: When I exit my word...