Use a seam sealant such as Fray Chek to secure the cut threads at the end of a serged seam. When beginning and ending a piece of yarn on a knit or crocheted item, leave a generous length of yarn to weave in. On most items, I leave 6 to 8 inches of yarn tail to weave in. Someone not familiar with knitting or crocheting may just cut the end off until the end is so short that the knot comes undone. Longer tails stay in better because there is still plenty of coverage if the iten stretches and a inch or so of stitches slide off of the end of the tail.
Some people like to change direction when weaving yarn ends into an knitted or crocheted item.
This helps keep the yarn from shifting when the item stretches. I have become adept at crocheting over most yarn tails to reduce the need to weave in the ends. Some people can do this with knitting, but I'm still working on that. If you are making a tied quilt, see the instructions for tying quilts without exposed ties at the Kansas City Linus Connection site or the Quilt Tying FAQ at the World Wide Quilting Page. Launder finished items as you might expect the recipient to launder it.