When cleaning a liquid spill it is imperative that you soak up all liquid before attempting to clean it. This is done by using a clean towel or paper towel, never use a coloured sponge from the kitchen as at times they can leave some colour behind. Always dab, do not rub and dry from outside in.
When you feel you have dried it all you can then dry it some more, when you have dried it some more then dry it once more, have i made it clear that you must remove all the liquid before you attempt to clean the area.
When cleaning, please do not use any home remedies as I have discussed previously, use only approved carpet cleaners or contact your carpet cleaner. If the spill is oil or a soap type spill then you will most likely not be able to remove it all and it is an area that will become dirty very easily as these products attract dirt, you most likely will need a professional cleaner.
Like cleaning up the stains in previous posts, please do not rub hard as you will only damage the fibers and when you have cleaned the area you then need to lightly clean a larger area to blend into the rest of the carpet.