If you are machine quilting, taking tiny stitches at the end and pulling threads to back and burying them is the best way. There is a french needle that is self threading that works well for this.
In hand quilting, knot the thread close to the fabric and insert needle into the batting, being careful not to come out the front. Let the needle travel a bit thru the batting and pull the knot into the fabric.