I like to do this if at all possible at the beginning of a new row, because it seems a bit neater for me, and is easier for me to weave in the ends of the old/new yarn. Sometimes, however, it may be necessary to join somewhere else along your row. This is fine.
This is how I do it: Wrap the tail of the new ball around my finger to keep it out of the way, then, holding the tail from the old ball and the working yarn together, knit 3-4 stitches. Drop the tail and continue knitting.
Remember on the return row you will have what looks like two stitches where you knit with both the old tail and new working yarn. Be sure you knit these together as one stitch, otherwise you will be increasing your stitch count. Weave in loose ends, and you are good to go.
Here is a video. Happy Knitting!