Washables: Use an eyedropper to apply a solution of one part white vinegar and two parts water, then rinse. If the coffee had milk or sugar in it, follow with an application of an enzyme detergent, such as Wisk, and water; let sit for 10 minutes. Finish with a regular wash cycle.
Nonwashables: Apply a gentle detergent, like Woolite, and water. Rub to form suds, then rinse. Next, use an eyedropper to apply a vinegar solution (see above), then rinse. If the coffee had milk or sugar in it, finish by applying an oil solvent, such as Carbona Stain Devil #5, and let dry.