Doing it right can make a huge difference in your finished item
The problem is worse if you have a project with a lot of stripes or colorwork. Last year I knit a chullo hat and ended up with 172 ends to weave in and clip! (Yes, I counted.)
Option 1: Don't weave them in
In a situation like that chullo hat, a lot of people opt to simply… not weave in the ends! With some colorwork projects, particularly those involving steeks or seams, you can sometimes get away with just clipping all the ends short. Lucky knitters may be able to hide the fringe of ends under a placket or button band.
This works best if you are using a "sticky" yarn, like the traditional two-ply Shetland. These rough yarns stick together and quickly felt at the end, which prevents your work from unraveling.
Option 2: Weave them in as you go
I'll be honest with you: this is one of those incredibly clever techniques that I have never quite mastered. There are a few different ways to weave as you go. Here's a great illustrated tutorial for one of the simpler methods.
Option 3: Weave up, then down
Thread the end on a tapestry needle, flip your knitting over so that the wrong side is facing, and run the end up through a vertical column of purl bumps - 3 or 4 is usually enough to do the trick. Then weave it down through the neighboring column, and clip it so that there is a little tail left (about a quarter inch).
This technique can sometimes be visible from the right side, depending on the yarn and stitch pattern you use. But it has two advantages: first, the end isn't likely to work use as the knitting is worn, because it's woven against the direction of pull. And second, it doesn't add as much notable thickness as the next strategy.
Option 4: Weave with the grain
Again with the wrong side facing, weave your yarn end through the stitches in a figure 8, following the path of the original working yarn. This technique is much less likely to be visible from the right side. However, it can sometimes make a noticeable lumpy bit in the knitting, depending on the yarn and stitch pattern used.