“What does John Locke mean by self-ownership? How does he think goods in the state of nature come to be owned by individuals?”
When John Locke refers to self-ownership he means that you as an individual have control over yourself. You are the one who makes the decision to breathe, eat, sit, walk, blink, etc. other people cannot control you and you cannot control other people.
Locke believes that to gain ownership of something you must mix your labor (labor that is a part of you and you own it because you control/“own” yourself) with a nature. Once you do that you own the product of your labor because “it is an extension of yourself.” Then you can sell it or do what you want to with the product.