1. Blot it up. Don't add cleaning products just yet. Take an absorbent, white towel and start blotting. Don't rub, don't scrub. Just blot and transfer the spill into the towel.
2. Start cleaning... which means add a safe neutral detergent to your spotting towel, never pour it on the carpet. Adding a small amount of cleaning product is best.
3. Flush it out. This means using a wet/dry vacuum to vacuum up all moisture.
Never use heat, and this means that hair dryer you might be tempted to use to dry the spot. This can actually "set" the stain.
A cool consumer and homeowner spotting guide can be found at the Carpet and Rug Institute website. Click here for that guide.
And when in doubt, always call your carpet cleaning pro.