Summarize:

Before dyeing, wash and dry the fabric as you normally would. This removes any dirt and oil that could keep the dye from penetrating evenly. Newly purchased fabrics may be coated with a finishing spray, so it is especially important to follow through with this step. The finishing sprays used to coat textiles are often chemicals that are often skin-irritants and they could interfere with how the textile fibers absorb the dye. The amount of coffee that you should brew will depend on how dark you would like the fabric to be. Stronger coffee will achieve a darker tint.  If you are looking to create a darker tint with the coffee, use more coffee or use a dark/very strong roast. If you would like a lighter tint, use less coffee or use coffee that is a light or medium roast. As an alternative to preparing several batches of coffee at home, you can use instant coffee or you can purchase brewed coffee from a local store or coffee shop. This could be significantly more expensive, however. Place the pot on the stove and turn the burner to high. The size of the pot will depend on how much fabric you are dyeing. As a rule of thumb, you will need a large enough pot to completely submerge the fabric in water. When the coffee is finished brewing, pour the coffee into the pot with the water. After pouring all of your prepared coffee into the pot, bring the coffee/water to a boil. Turn off the heat as soon as the coffee reaches a full boil. Once you have turned the heat off and the coffee has stopped bubbling, submerge the fabric entirely into the coffee. Stir it around a bit to make sure any air pockets are eliminated. Since the water just stopped boiling, it may be best to use a wooden spoon, so as not to burn yourself or ruin your utensils. The longer your fabric steeps in the coffee, the deeper it will be dyed. You will need to wait about an hour for appreciable, colorfast results, but you can allow a longer steeping time for a deeper tint. Remove the fabric from the coffee dye and rinse it thoroughly under cold water. Do this until the water runs clear, which will indicate that all of the excess dye has been removed.  After rinsing the excess coffee dye, you will be able to accurately tell how dark the fabric has been tinted. If you still want the fabric to be darker after rinsing it, you can steep the fabric again. Once you have achieved the desired tint, prepare a large enough container to hold all of your fabric with cold water and let the fabric soak. You can add vinegar to this cold water bath and let soak for ten minutes to set the dye. When you are finished dyeing the fabric, rinse the pot. The coffee dye may stain the pot if you do not drain and wash it promptly after the dyeing process is complete. Use a delicate cycle in the washing machine with cold water and use a mild detergent. You can then dry the fabric on low in the dryer or hang it up in the shade to dry. The coffee dye described above will not provide a completely colorfast finish since it is a natural dye, which means that the color will fade a bit with each successive wash.
Wash the fabric beforehand. Brew coffee. Fill a pot with water. Pour brewed coffee into the pot. Bring the mixture to a boil. Add the fabric to the pot. Steep the fabric. Remove and rinse the fabric. Rinse the pot. Wash and dry the fabric gently.