Always use the new color for the final “yarn over and pull through” of your last stitch. I also highly recommend that you leave a 6-8″ tail of BOTH the new and old color. These 6-8″ tails will be the loose ends that will hang from your work until you are ready for finishing. Then, they will be “woven” in at finishing to complete the project.
You can also tie the new and old colors together in a loose knot if you prefer (keep it loose so that you can undo the knot when you are ready for finishing). Otherwise, just leave them loose and any stitches next to the joining that need to be tightened can be tightened when the loose ends get woven in.
How do you weave in the loose ends? Thread each of the 6-8″ tails into a yarn/tapestry needle (a sewing needle that is made for yarn) and “weave” the needle into your knitted or crocheted fabric with the goal of hiding your needle (so that the loose strand will get hidden in your work). For instance, if your loose end is at the edge or your work, begin poking your tapestry needle into your work starting at the edge and working in or along the edge (depends on where it can best be hidden). As you poke your needle in the fabric, if you see large parts of your needle through your work, you should pull the needle out and try again.
The goal here is to really bury the yarn inside the fabric. For crochet fabrics, this is a bit easier due to the thickness of crochet. I often hide loose ends in the insides of a row of single crochet, or along the base of a row of double crochet stitches. For knitting, I often split the yarn and hide the loose end that way.
I recommend weaving in the loose end for about 2″ in one direction, then changing directions and weaving in the loose end another 2″. This sounds like a lot, but I believe it’s necessary to ensure that that loose end will never worm itself out enough to cause anything to unravel. This is especially important if the yarn is a slipperly silk or rayon blend.
Be sure to hide each loose end in its same color area. And if you are hiding loose ends near a seam, just hide the end in the inside of the seam!