Act promptly. As with all stains you have to resist the temptation to push the stain further in; blot the excess with a paper towel, do not rub. Start from the edges and work inward, to prevent the stain from spreading.
Use a non-acetone nail polish remover on a cloth to blot the stain out. Hair spray or rubbing alcohol can also work, but spot test in an inconspicuous place to make sure the carpet colour isn’t affected. Once the nail polish is gone, wash with mild detergent (dishwashing liquid) and warm water.
Blot the stain with rubbing alcohol and a paper towel, working from the outside edges to the inside. This may take some time. After the stain is gone you can remove the alcohol with warm water and detergent. If the shape of the ink blot causes a strong emotional reaction, consult a psychoanalyst.
Coffee stains are as common as coffee drinkers; in some households this means frequent stains. On carpet this is an issue. For black coffee blot excess coffee with a towel, and then blot the stain with either a mixture of 2 part water to one part vinegar, or with diluted detergent. If there was any milk in the coffee add an enzyme laundry detergent. After rinsing with water cover with a paper towel to soak up the moisture.
Absorb as much liquid as possible with a cloth. Then try a mixture of baking soda and water (3 parts water, I part soda), or club soda, or diluted white vinegar, or a professional stain remover (follow the direction on the pack).
Some people claim white wine helps remove red wine stains. We cannot vouch for this method.
This is not quite the same as red wine. Blot as with the other stains, and use either diluted ammonia (one tablespoon per 2 cups of water), or a cup of hydrogen peroxide with a tablespoon of detergent.
After any stain has affected your carpet you should seriously consider steam cleaning. For carpet cleaning, Perth based Top Carpet cleaning is recommend.