If you want to wash the yarn, wind it into skeins first. If you don't have a niddy noddy, the easiest way is to wrap it around your elbow and the V between your thumb and forefinger, or around the back of a chair. Take some scrap yarn and tie it around the yarn in four spots around the loop. That will keep it from tangling.
Hand wash the skein in lukewarm water and a mild detergent by letting it soak, rinse, and repeat. Do not agitate. Then hang it to dry from a non rusting coat hanger. Use another hanger at the bottom for a bit of weight.
When dry, they'll be good as new!
It's a lot of effort, but worth it. Of course, you could always just knit with it and wash the finished object instead.