The first thing that one of them finds is chewing gum. Scout finds it and chews it and Jem gets all angry at her. But then they keep finding more stuff.
At that point, the two of them talk about it a bunch. They decide that the knot hole must be someone's secret hiding place. So they think that someone must have put the stuff there because it was valuable to them.
So they decide to hold on to the stuff and wait until school starts. At that point they'll see if it belongs to anyone.
You can find this in Chapter 4.
At first they assume that it must be some little kid's hiding place, and since things show up there and no one else takes them, they decide that anything found there will be their own. After a time and when they find things they know a child wouldn't put in there, they decide to write a letter to whomever it is giving them these gifts. Only by that time, the hole has been filled with cement by Nathan who claimed he did it because the tree was dying. Jem and Scout suspect this might not be the case, but move on as they can't pursue the matter further.