His theory of knowledge is that we truly know something when we have spotted agreements between two or more ideas.
(Remember though that Locke thinks most of the stuff we ordinarily think of as 'knowledge' is not knowledge at all, but 'probable opinion'.)
Knowledge is 'the perception of the connection and agreement, or disagreement and repugnancy of any of our ideas.' Locke, Essay 4. 1. 2.