Descartes claimed that he had cast all that he had previously believed into doubt before examining what remained. The argument runs that even if God has deceived him by placing thoughts in his mind, the mere fact of his being deceived means that something capable of being deceived must necesserily exist.
"But how do I know that there is not something different altogether from the objects I have now enumerated, of which it is impossible to entertain the slightest doubt? Is there not a God, or some being, by whatever name I may designate him, who causes these thoughts to arise in my mind ? But why suppose such a being, for it may be I myself am capable of producing them? Am I, then, at least not something? But I before denied that I possessed senses or a body; I hesitate, however, for what follows from that? Am I so dependent on the body and the senses that without these I cannot exist? But I had the persuasion that there was absolutely nothing in the world, that there was no sky and no earth, neither minds nor bodies; was I not, therefore, at the same time, persuaded that I did not exist? Far from it; I assuredly existed, since I was persuaded. But there is I know not what being, who is possessed at once of the highest power and the deepest cunning, who is constantly employing all his ingenuity in deceiving me. Doubtless, then, I exist, since I am deceived; and, let him deceive me as he may, he can never bring it about that I am nothing, so long as I shall be conscious that I am something. So that it must, in fine, be maintained, all things being maturely and carefully considered, that this proposition (pronunciatum) I am, I exist, is necessarily true each time it is expressed by me, or conceived in my mind."[L][ F][M2]
The Discourse on Method was written in French, and there Descartes used the phrase, "Je pense, donc je suis." Descartes decided that this phrase could be misleading because it implied that he was appealing to an inference, so he changed the phrase to "I am, I exist" ("the first certainty") so as to avoid the term "cogito" in the later Meditations.
There have been a number of criticisms of the Cogito argument.
This video is the argument itself, and not one of the many criticisms: