An urban myth of knitting is that new yarn always ought to be added at the end of a row (side of the fabric) (scroll).
On the one hand, if you are knitting an item to be seamed, this advice can be good (see trick the third, below).
On the other hand, for items where the edge of the knitting is the edge of the garment (scarf, shawl, stole), or for items where you plan to add an edging, this advice is pretty bad. Adding yarn at the end of a row can leave a big loopy gap along one side of your knitting, and/or a lump where the ends are worked in. The side of your work is probably an inconvenient spot for that gap/lump.
Also, advice to put the yarn change in the seam is of little use to circular knitters.
Another myth is that yarn should be "tied in" with a knot. I've ranted elsewhere against knots in knitting--even slip knots, and won't repeat here. I will add, however, that even the tightest knot has the potential to come undone over time with the kind of wear a knitted garment will get.
Anyway--enough about what won't work. Here are three tricks for adding a new ball of yarn.
Trick the first--felting
(fair warning: if you're squeamish, skip straight to trick the second)
(fair warning: if you're squeamish, skip straight to trick the second)
Evidently, the oldest kind of yarn-made fabric is nalbinding. It is made with a large-eyed flat bone-type needle, using short lengths of yarn--originally, the sort of primitive yarn spun by rubbing it between the palms.
Obviously, a major nalbinding issue is how to attach each short length to the next.
Nalbinders solved this problem long ago--maybe in the ice ages--by felting the ends of the yarn together with (this is the squeamy part) spit. Today, most choose to use water, but if you're lazily knitting in bed .... well, just resolve to thoroughly wash your knitting before wearing.
HOW-TO felt the ends
Overlap the ends of the yarn in your hand--by maybe a couple of inches. Add a small amount of the liquid of your choice, and rub the ends between your fingers and your palms or between both palms, until the ends felt. Yup, that's it.
click picture

BUT--felting works best on wool--preferably thickish wool. Felting is a poor choice for thin yarns, such as lace, because even the most careful felted join will show against the lacy fabric. And felting works not at all on non-wool yarns. Which brings us to...
Trick the second--overlapping
HOW-TO overlap
Overlap the new end and the old end. Knit THREE stitches with both yarns, then drop the old yarn.
click picture

click picture

click picture

click picture

click picture

With non-wool yarns, three stitches MIGHT be enough to hold the ends for all times, and it might not, depends how slippery the stuff is. I find that superwash wool, for example, requires more, so I'll sometimes work 4 overlapping stitches. If you have doubts, then use the overlapping method of join PLUS, for insurance, work your ends in further using whatever method you generally use, before you clip the excess. (Working-in ends will be the subject of a future post...)
If there is a pattern to your knitted fabric, think about placing your overlapped stitches there, rather than out in a flat, smooth stockinette stitch area. The 3-stitch-overlapped join is nearly undetectable, but by placing it in a pattern--where the eye is already predisposed to accept a disturbance--you have additional insurance that no one will ever notice.
Trick the third--for items to be seamed
A reader of this blog, Noricum, gets the credit for this trick.For garments which will be seamed (sweaters made in pieces, for example) the idea is to change balls at the side (seam edge) and leave a long tail from the new ball AND the old ball. When the time comes to seam the garment, use the long tails for the sewing yarn--remember to cross the yarns, one going up, and one going down, in such a way as to draw closed the gap where the new ball comes in. Thanks Noricum!
* * *
PS: Here is a link to a post with 10 (!) different methods of working in ends in knitting, eight of which are "as you go."
* * *
--TECHknitter