Dealing with carpet stains can be a bit tricky -- you can't pull up wall-to-wall carpet, pre-treat the stain and throw the whole thing in with a load of laundry. Nor can you take it to a dry cleaner to have them deal with it. The key to dealing with a stain on carpet is knowing what the substance is, or at least having a general idea, to determine a suitable approach to cleaning. Much like laundry, the methods to treat different types of stains on carpet vary.
Red Wine, Juices and Coffee
Red wine and grape juice leave their mark on carpet if not cleaned up immediately, as does coffee and other tinted beverages. If you're able to work on the spill while it's still wet, blot up as much as you can with paper towels. Just blot, don't rub, or it may spread the stain. If the substance is dry or you've blotted up as much as possible, pour a small amount of cold water over the stain, blotting up the water. This dilutes the drink stain if still wet, or may loosen some of it from carpet fibers. Continue blotting until no more wine is noticed on the paper towel. Mix 3 parts water to 1 part baking soda, forming a paste to pour over the stain. Vacuum once dry. If that still doesn't remove the stain, mix 1 tablespoon each of liquid dish soap and vinegar into 1 cup of lukewarm water. Dab the mixture over the spot, blotting until the stain disappears.
Waxy or Oily Substances
Waxy or oily foods and household substances can often be removed with a clothes iron and a thin ironable rag or dish towel. Adjust the iron to a low setting, place the material over the stain, then iron the fabric, moving the iron around to warm the entire area. Check the fabric frequently to see if it absorbed the stain substance; heat softens greasy, waxy substances up enough that the fabric can absorb them. If candle wax or gum worked its way into the carpet, rub an ice cube over the substance to harden it, then shatter it with a spoon bowl and pick up the cold pieces. Remaining amount of candle wax can be removed with the iron method. Oils such as cooking oils and motor oil, if they don't disappear after the warm iron method, can be treated with the wine removal technique.
No matter how well they're trained, pets sometimes have "accidents" on the carpet. If the soiling is fresh, remove what you can of it while wearing rubber gloves by picking up solids with a paper towel, or blotting up liquids with paper towels. Mix a 50-50 vinegar and water solution to spray over the soiled area to neutralize odors. Blot after a few minutes, then sprinkle baking soda over the area. Pour a mixture of 1/2 cup hydrogen peroxide and 1 tablespoon dish soap over the baking soda, working it in with your gloved fingers or a scrub brush. Vacuum once the area dries.
Ink is one of those easily-noticed stains, especially on a white or light carpet. Regardless of the type of ink, standard rubbing alcohol usually does a good job of loosening its grip on carpet fibers. Test the alcohol on an inconspicuous area of the rug first to make sure it doesn't cause discoloration. Pour rubbing alcohol onto a clean white cloth or cotton ball, then dab that over the ink stain. Blot over the area with paper towels without rubbing, as the ink may spread. Continue dabbing with alcohol and blotting up the moisture until you've removed as much ink as possible.