The quicker a spill is treated the better. Wet spills should be blotted immediately with clean paper towel until all moisture is removed. Do not rub the spill. As a general rule most spills can then be flushed out with a 50/50 solution of white vinegar and luke warm water. The process should be repeated with flushing and blotting until there is no longer any transfer onto the blotting towel.
Small stains on the carpet can generally be removed with Benzine on a clean towel. Always do a test in a place where it will not be seen.
For more complex stains or spills we suggest an internet search specific to your situation.