Read the pillow label. If you have discarded the label without reading it, see if the pillow has a zipper along one side. If so, open the zipper and see if there are identifying tags inside the cover or on the insert. If not, if you can remember where you purchased the pillow, you may be able to call and track down the manufacturer's website.
Separate the cover from the inside pillow form. If the pillow form is a solid foam type, then you can hand wash the form to remove stains and odors. For shag where you can identify the material (such as jersey T-shirt fabric shag), you can hand wash or machine wash the cover on the gentle cycle with gentle soap.
Place the shag cover in a lingerie bag before placing it in the washing machine. Treat any spots with extra soap rubbed into them. Use cold water to wash and rinse to prevent shrinking.
Hang or lay your cover flat to dry so that it doesn't lose its shape. If your cover is hairy, then you may want to give the hair a good brush to fluff it back up after it dries.
Dry clean the pillow if you are unable to determine the fabric type or origin or recommendations for cleaning. Often, the cleaner can tell you whether the pillow can be cleaned and what he can do with it.