I'm assuming you are talking about the knitted work on the needles? The rolling up there is more to do with the pattern than the yarn.
With some types of patterns rolling is inevitable. Stocking stitch is especially bad for rolling up (1 row knit, 1 row purl, repeat). Other types of stitch pattern stay straight no matter what, e.g. garter stitch (knit all stitches & all rows) and rib stitch (k1, p1, repeat). This is actually why most knitted sweaters have a ribbed collar, cuffs and hem, because otherwise sleeves etc would curl up. Maybe other knitters have some ideas on how to keep work straight as they knit... but if my work rolls up I don't even try to keep it straight; it's because of the pattern. When you finish knitting, a blocking technique will help keep the finished item straight (ironing it while it's pinned down). Hope this helps!