The definition of labor in this case is basic: if a person applies any kind of natural, lawful effort to gain possession of something that was previously considered common property - in other words, without an individual owner - this thing becomes this person's private property. At this point, no other person can take possession of the said thing without the original owner's consent.
Locke distinguishes between the natural and unnatural actions seeking to gain possession of something, with it depending on whether the something sought for acquisition is already in private possession or still within the common domain. A person who seeks the goods already in possession of someone else does not really seek to apply his labor to the acquisition of the said goods, but rather to enjoy the fruits of someone else's labor without giving anything in return.
Should not a person taking possession of something in such a manner first ask permission of others, considering that the said something has been previously in common possession? Locke shows the impracticality of such an approach by a simple example of a hungry person having to ask all the people in the world whether or not he can eat an apple he himself plucked from a tree or picked up underneath it. In the same manner, if a single person takes possession of something while leaving a plentiful supply of the same thing for others to use, no usurpation of property occurs, and such action must be considered a natural occurrence.
Locke