There are two ways to go about this--intarsia and the easy way.
For intarsia, you'd have all the yarn attached to your needles at once. You'd need to do a cable cast on, switching colors (there's video of cable cast on) and then knit the stripes, making sure you twist the yarns to avoid a hole (also video on that here.)
The easy way is to knit it lenghwise on a very long circular needle, working back and forth. You'd knit for an inch with one color, then switch to another for the next inch. Long rows, but pretty simple.