Descartes was attempting to find and formulate a philosophy of irrefutable truth. His initial goal in the first Meditation is to determine what he can be certain of. To do this, he first had to analyze thinking itself. In the first Meditation, Descartes begins by doubting everything. For him, it is not enough to learn things from history or through sensory experience. He determined that anything learned in this way could be an illusion. He supposed that anything could be the product of a dream or that everything he experiences is the result of some trick put upon him by a demon. He is only certain that he is a thing that thinks. Hence, his famous maxim, "I think therefore I am."
Descartes notes that we come to know (true or not) things by perception or judgment. In a simpler way, this is like saying we come to know something through sensory experience or through rational thought. For example, I can see some wax and sense that it has color, shape, substance, and so on. But when it is next to the fire, those qualities disappear. He concludes that his sensory (seeing) experience of the wax doesn't necessarily give him the truth about the wax. He must make a mental judgment (knowing the chemical content, heat, and so on) of the wax to really know it. He carries this lesson to knowing the self (mind). I can surmise what it is to know myself by seeing other selves and things in the world. But it is my mental judgment (thinking) that allows me to come closer to the truth of my own mind.
This establishes Descartes' separation of the mind and the external world; thus underscoring the two ways people come to know things: through sensory experience of the external world and through internal, mental (rational) thinking. Similarly, I can see that a square has four sides and four corners, but the square itself can bend, be erased, changed, etc. Therefore, it is my mental judgment that conveys a clear and distinct truth about the (or "a") box. This separation, often attributed to Descartes is known as dualism: a separation between mental and physical events.