We read from ‘Book 2, Chapter 1’ of Locke’s  An Essay Concerning Human Understanding’ and saw how he believed our minds come to be filled with ideas.  We saw that,  for Locke all ideas come from two sources: 

1. experience of ‘external objects’ received through our senses 

  2. experience of the workings of our own minds. 

As he puts it: 

Our understandings derive all the materials of thinking from [1] observations that we make of external objects that can be perceived through the senses, and [2] of the internal operations of our minds, which we perceive by looking in at ourselves. 

For Locke, those are the only ways that we ideas. He says, ‘These two are the fountains of knowledge, from which arise all the ideas we have or can naturally have.’
 (‘Essay’ Bk ii Ch.1)