Start out knitting your scarf with the stripe colour you have chosen. Cast on with it and knit it til it is the length you want it to be, then at the end of a row, cut this yarn leaving about a 12" tail.
Take a new colour and take a stitch as usual but with the new colour as you wrap.
I often like to twist the old yarn around the new yarn as I do that first stitch so it will stay in place.
Then continue with your scarf until it is as long as you want it, cut that yarn leaving a 12" and use the new yarn to stitch with, wrapping the old yarn around the new yarn to hold it in place.
This can be done a couple of times so that it doesn't come undone and when you are finished with your scarf, make sure you are able to tuck in these stray yarn pieces by weaving them into the back of your scarf as nicely as you can.
If it makes you feel better, instead of wrapping the old yarn around the new one, you can just tie them loosely in a knot to be taken apart and woven into the finished product later.