Locke was an empiricist philosopher. What this means is that he thought our knowledge of the world was ultimately derived through our senses. Empiricism is usually contrasted with rationalism, which holds that ultimate reality can be deduced through the mind by way of rational deduction. The classic example of this intellectual process would be mathematics.
Locke believed that the human mind was a tabula rasa, or blank space, onto which sense experience projected itself. Gradually, as we gain more experience of the world through our senses, we gain more knowledge. Locke, like all empiricists, strongly objected to the rationalist notion that we have innate ideas. Any ideas we do have are not there in our minds from birth; they are simply derived from our sense experience as we progress through life. Without sense experience there can be no ideas.
But not all objects are the same for Locke. Each of them has different properties. Locke makes an important distinction between primary and secondary qualities. Primary qualities relate to those properties which are "out there" in the world, which give us facts about a particular object. In other words, primary qualities are objective.
Take the example of a red ball. In this particular object, the shape of the ball, its roundness, is a primary quality. The ball's roundness is in the object itself and not in our minds. Because of this, shape, like all primary qualities, can give us certain knowledge.
Secondary qualities, however, are rather different. They are properties such as color, taste, and smell that produce sensations in us. They are not out there in the world; they exist in our minds as we react to the sensations they cause. Locke doesn't know quite how this is all supposed to happen, which is something of a hole in his empiricist argument, but we can still understand what he means.
Again, let's look at the example of a red ball. Here, the secondary quality is the ball's color, its redness. But because the redness is in our minds, it cannot give us the kind of objective certainty that a primary quality such as roundness can give. In other words, primary qualities can be measured, but secondary qualities cannot. Therefore, according to Locke, secondary qualities such as the redness of the ball can only give us subjective knowledge. And for him, as for all empiricists, this kind of knowledge is less than certain.