Eventually, you’ll run out of yarn and will have to join a new ball of yarn. Whenever possible join the new yarn at the beginning of a row. Joining yarn elsewhere in a row is unavoidable when colour knitting or knitting in the round. The yarn required to complete a row is approximately equal to 3-4 times the width of the piece. If you have this much yarn left, work the row; if you don’t, start a new ball of yarn as described below.
Some knitters drop the old yarn, begin knitting with the new yarn, and tie the yarn tails into a square knot. This works, but can be sloppy, and the yarn ends can easily work themselves out, needing to be fixed later. Some books mention splicing plied yarns, but this is tedious. My preferred method is to overlap the old and new yarns at the edge, knitting the first two stitches with both yarns. This works well for the majority of yarn weights, except for very bulky yarns.
Overlap the end of the old yarn with the beginning of the new yarn, and work the first stitch with the two strands of yarn. Drop the old yarn end, pick up the tail end of the new yarn and the new ball yarn, and work the second stitch, leaving the short ends on the wrong side. Drop the short end of the new ball of yarn and continue across the row with the new yarn. Leave the short ends of yarn on the wrong side. Pull snuggly on the two short ends. When coming back across the row remember to work the double strands at the edge as single stitches. When your project is complete, weave these yarn ends into a seam or wrong side. I have a short video titled “Joining New Yarn” on Urban Knitters YouTube channel demonstrating this method.
With garments or items with seams, the yarn ends should be woven into the seam. The yarn ends are more secure in a seam, than woven into the body of the piece.
Give the overlap method a try; I think you will be happy with the results.