Prewashing fabric does three things:
removes loose dye
removes starches, fillers, manufacturing process residues, and pesticide residues. Yes, pesticides. These are often put on fabrics to protect them in storage.
To prewash a fabric, Wash the fabric as you would the finished garment.
When you buy the fabric, take note of the content and suggested laundering information on the bolt. Dry Clean Only often means Gentle Handling Only.
Throw it in the washer and dryer. Short cycle needed only. Dry on Permanent Press until Damp. Iron out the wrinkles. If it is a small piece, you can just tub wash it and hang it to dry.
If it is a cotton or linen, hot water will shrink it to the maximum. Denim needs to be washed and dried several times. Silk needs tepid water. Synthetics can be washed in tepid or cold water. They do not shrink. Knits, esp. those with Lycra, need tepid water. Lycra hates heat, and even blends should be air dried. Rayon is a synthetic between cotton and polyester, treat it like a silk. Cool water, hang to dry, or tumble dry till damp. It will change in texture. Acetate is the same, does not like a lot of heat, but can be washed. Hang to dry.
Wool can be dampened or soaked with water, rolled in a towel to blot dry, then air dried. It can also be thrown in a washer, and tumble dried. Just be prepared for a change in texture as it will felt. Although with some wool, this is not a bad thing….
If you are not sure about washing, or are unsure about the finish after washing, make a test run. Some fabrics like Chintz have a shiny finish that sometimes will wash away with laundering. Sample washing will tell you this before you start. Cut a width of fabric, about 1/8 yd. Cut this into three equal pieces. Handwash and air dry one piece. Throw one piece into the washer and dryer. Keep the third piece to compare the other two samples to. See if there are any changes to the fabric pieces, and if you like the changes, if any. Sometimes, the fabric comes out better than you expect, sometimes it does funny things. At least you know what you are working with.
Pinking, serging, or even sewing the ends will prevent fraying. Long yardages of fine fabrics can be pillowcased. Small pieces can be put into lingerie bags.
For Home Dec. projects like curtains, prewashing may be next to impossible. Make sure that you incorporate extra length into hems for rehemming after washing the finished curtains.
You may find some of the following links helpful, I am not sponsoring them, I just found the information to be good.
Hope you find this short bit to be helpful. Cathy