Wash fabrics as recommended after these treatments—the sooner, the better.
Stretch the fabric over a bowl and carefully pour boiling water through the stain from about a foot above. If the coffee had milk in it, follow with an oil solvent. If it contained sugar, follow with a pre-treatment product and let sit for 30 minutes before washing.
Scrape off the excess with a plastic knife or a spatula. Spray with a dish-soap solution (1 tablespoon clear soap to 10 ounces water), then dab with an enzyme detergent before washing. (Most everyday detergents contain enzymes.)
Saturate the stain with white vinegar, then apply a dish-soap solution.
Flush with cool water. Apply a prewash stain-removal product, then soak in a sink filled with cool water and a few drops of detergent.
When the stain is dry, gently scrape off the excess with a plastic knife. Dab on a bit of water and some gentle detergent. Rub to form suds, then rinse. To lighten the remaining stain, apply a solution of 1 part water and 1 part white vinegar.