Locke distinguishes between real essences (the way things really are) and nominal essences (the way our complex ideas of things represent them). According to Locke, our knowledge is only of nominal essences. Whether we can get knowledge of real essences is something philosophers disagree about. For my part, I have always thought Locke believes we can get knowledge of real essences if scientific tools advance to a sufficient extent.
Locke distinguishes three sorts of questions we can ask about identity: