The discussion of substance and its properties is much more complex than the discussion of eternal truths, but once all the terms are sorted out it is not that difficult to grasp. There are three terms that are crucial to Descartes' understanding of basic ontology: substance, principal attribute, and mode. A substance is just a self-subsisting thing. A principal attribute is a special property of a substance, the property that makes that substance the kind of substance that it is. ("Principal attribute" is just another way of saying "essence".) A mode is any other property of a substance.
Descartes defines a substance as a thing that does not depend on anything else for its existence. That is to say, substance is a self-subsisting thing. Strictly speaking, then, only God is really a substance, because everything else depends on God for its existence (according to Descartes' picture, not only does God initially bring us into existence, but he must continually recreate us at every instant). More loosely speaking, though, anything that depends only on God for its existence counts as a substance.
The first thing to realize is that according to Descartes there are only three substances in the world: there is God, there is mind, and there is body. Jello is not one substance and gold another; both are the same substance of body. Since a principal attribute is the property that makes a substance the kind of substance that it is, there are also only three principal attributes: we have no idea what God's principal attribute is (if he even has one), but the principal attribute of mind is thought, and the principal attribute of body is extension.
The second important thing to realize is that the distinction between substance and principal attribute is only conceptual. That is to say, we have two concepts, (i.e. "principal attribute" and "substance") but these two concepts do not actually correspond to two different things out in the world. There is no such thing as a substance without its principal attribute. Body cannot exist without extension, and mind cannot exist without thought. This makes perfect sense when you consider that the principal attribute makes the substance what it is. How could a substance exist, Descartes asks, without being any particular kind of thing? It is impossible. In fact, not only can a substance not exist without its principal attribute (a metaphysical claim), a substance cannot even be clearly conceived without its principal attribute (an epistemological claim). How can you clearly conceive of something without clearly conceiving what sort of thing it is? The relationship between principal attribute and substance, then, is extraordinarily intimate.
The strong conceptual relationship between a substance and its principal attribute is what Descartes draws on in order to prove that the essence of mind is thought and the essence of body is extension. The proof of these claims rests on an unstated premise: P is the essence of S, if and only if I can conceive of S attributing only P to it. We can understand why Descartes would feel justified in asserting this premise given the strong conceptual relationship between a substance and its principal attribute. The principal attribute (or essence) is just that property that allows you to conceive of the substance. Whatever property that, all by itself, allows you to clearly conceive of the substance, then, must necessarily be the essence of that substance. (The full proof that thought is the essence of mind, and extension of body, will come in the next section.)
A mode, on the other hand, is much less intimately connected to a substance. A substance could exist without any particular one of its modes (though it could not exist without any modes at all). For instance, a substance could exist without being square, but it cannot exist without being shaped. A mode is actually just a particular way of being the principal attribute. A principal attribute is something determinable, (i.e. the property of extension or the property of thought) and a mode is a determinate way of being extended or thought (for instance, square is a way of being extended and imagining a unicorn is a way of being thought).
Descartes' analysis of substance and principal attribute is probably the most important section of Part I. It is in defining this terminology that he lays the groundwork for his entire physics, by establishing the subject matter of that science. In defining physical substance entirely in terms of extension, Descartes is ensuring that the physical sciences can be conflated with the study of geometry. All properties of substance can be explained simply by appealing to the properties of geometric figures. It is in this discussion that we see Descartes at the height of his offensive attack on Scholastic philosophers.
Like the Scholastics, Descartes claims that substances are the most basic units of existence. Where he diverges is in claiming, first, that there are only three substances and, second, that substances and their essences have such a tight connection. According to the Scholastic view there were numerous substances, all composed of various combinations of the four elements. The essence of a substance was the property that made the substance the sort of substance that it was, but aside from that important role it was no different from other properties. The further properties of a substance did not have any connection to the essence. For example, according to the Scholastics the essence of man was his rationality. However, man could also have qualities such as "pale" and "tall" that had nothing to do with this essence. In addition, according to the Scholastics, substance could survive the loss of its essence, though naturally not as that same sort of substance. So, for instance, if a man lost his rationality he would cease to be a man, but he would not cease to be a substance. He would just be a different sort of substance. It is by strengthening the connection between essence and substance that Descartes is able to so reduce the number of substances in the world. If a substance cannot be conceived of without its essence, there are very few candidates for essence and, correspondingly, few for substance. The only things we cannot conceive of are the logically impossible.