Under the unassuming heading "Other Considerations Concerning Simple Ideas," Locke next introduces one of the most important topics in the entire Essay: the distinction between primary and secondary qualities. Locke tells us that there is a crucial difference between two kinds of simple ideas we receive from sensation. Some of the ideas we receive resemble their causes out in the world, while others do not. The ideas which resemble their causes are the ideas of primary qualities: texture, number, size, shape, motion. The ideas which do not resemble their causes are the ideas of secondary qualities: color, sound, taste, and odor.
The best way to understand the distinction between primary and secondary qualities is in terms of explanation. Whenever you have the sensation of a square book the cause of that sensation is some sort of shape out in the world (though not necessarily squareness, since there may be some optical illusion, because distance, for instance, forcing you to perceive the shape incorrectly), so the explanation for sensation of shape is shape in the external world. Whenever you have a sensation of blue, on the other hand, the cause is not blueness out in the world. The cause is some specific arrangement of the insensible parts of matter. Explanations for secondary qualities refer only to primary qualities.
Locke's argument for this claim is based on his estimation of the "best science available", which he believes is Boyle's Corpuscular Hypothesis. According to the best scientific picture we have of the natural world, Locke argues, all that is out there are colorless, tasteless, soundless, odorless corpuscles of matter. Using only these indivisible bits of matter and their motions, we can explain not only our sensations of primary qualities, but our sensations of secondary qualities as well. Sensations of color, odor, taste, and sound are caused by the primary qualities of arrangements of matter. (Locke refers to these arrangements as the "powers" of objects to cause sensations.) Given that we are able to explain everything we need to explain by positing the existence only of primary qualities, he reasons, we have no reason to think that secondary qualities have any real basis in the world. An argument of this form is often called an "argument from parsimony" and rests on the premise that it is best not to posit the existence of explanatorily superfluous entities.
The rest of Locke's discussion of the primary/secondary quality distinction focuses on making the conclusion seem more plausible. He presents a number of thought experiments designed to bring our intuitions into line with his. First, he describes breaking a piece of wheat up into smaller and smaller pieces. He points out that as small as the wheat becomes we cannot conceive of it without its primary qualities (presumably since the very idea of a body without shape or size is incoherent) whereas we can conceive of the wheat without color (presumably because there is nothing literally incoherent about a body without color, even if it is difficult to imagine one in actuality).
He next considers an almond that is being pounded with a pestle. As it gets broken up into smaller and smaller pieces, the color changes from a pure white to a dirtier hue, and the taste goes from sweet to oily. Yet all that was altered was the texture of the nut. Clearly, he concludes, the secondary qualities depend on the primary qualities.
Finally, he takes the example of a flame. If we put our hand in the flame we have a sensation of pain. If we look at the flame we have a sensation of color. No one would claim that pain is in the flame itself, he points out, so why do we suppose that the color is?