At the end of the first Meditation Descartes was left believing that he knew nothing. There was, he supposed, an evil genius whose whole purpose was to deceive him. Now he looks for some point from which to regain knowledge--one spot from which to move the world. He thinks again of what he can possibly know, and hits on one thing--his own existence. He determines that no matter how hard anyone tries to deceive him, he can't be wrong about the fact that he exists, because someone needs to be there to be deceived. If he thinks he exists he can't be wrong, because there has to be someone to do the thinking and to be mistaken. So he knows one thing for certain--that he exists.
But what is he? He is careful at once not to get carried away. He knows he exists, but he doesn't know what he's like. He doesn't know that he has a body, or that he is a rational animal or any such thing, so what can he know about himself with complete certainty? Is there anything essential to him such that knowing he exists is the same as knowing that he has this attribute? He goes through a list on p.488, and determines that the only thing he knows for sure about himself is that he is a thinking thing--a thing which thinks, reasons, believes, doubts, affirms wills and denies. This is all determined by p.489.
But then he asks whether he is also a creature who perceives--a being who sees, and hears, and tastes, and smells. In reply to this he makes an important move. He says that he does all of these things if they are properly understood. What he knows is that he has certain images as if of things outside of him. What he doesn't know is that these are really of things outside of him, or caused by things that resemble them. So as long as saying "I see an apple" does not imply that there is an apple, he is a being who sees. What he does is imply that what we really see, hear, etc. are images in our minds, and not actual objects and sounds. He drives a wedge there, making perception indirect, and this is what keeps him (for the time being) trapped inside of his own head so that he can know nothing about anything but himself. This is the condition in which he finds himself by the end of Meditation II.
At the end he has a long discussion of a piece of wax. What is that all about? What is he trying to prove and how does he mean to prove it?