The answer to this is a bit complicated (no surprise there) and not terribly convincing, but here it is:
First, Descartes has to prove that there is something out there other than ourselves. He argues that we can prove this by the fact that we have all these sensations (the heat from a fire) for example, that we do not consciously cause. (We feel the heat whether we want to or not, whether we think about it or not.) Because we don't cause the sensations, something outside us must cause them.
Second, he must prove that the something that causes the sensations is material. He says there are three options for what could be causing them: A) God, B) something material, C) something else that's not material but created, presumably by God.
His only argument for why B is true is that God is not a deceiver. He says that God has given us a propensity to believe in coroporeal things. Since God would not deceive us, therefore there are corporeal/material things out there that are causing the sensations we feel.
Descartes says there should be some process by which data acquired by sense organs and are being formed into “ideas” and the interaction between their insonsistencies give rise to doubt. And to dispel that doubt needs true knowledge which cannot be doubted is given by the rational thought that is Mind. Here Descartes says that process in which the “consciousness” developed is internal world and the cause for getting sense data through our sense organs from out side the mind is “External World.”
Descartes also wrote a response to skepticism about the existence of the external world. He argues that sensory perceptions come to him involuntarily, and are not willed by him. They are external to his senses, and according to Descartes, this is evidence of the existence of something outside of his mind, and thus, an external world. Descartes goes on to show that the things in the external world are material by arguing that God would not deceive him as to the ideas that are being transmitted, and that God has given him the "propensity" to believe that such ideas are caused by material things.
René Descartes; Discourse on the Method and Principles of Philosophy; 1637.