Catch it while it's fresh; chances of removal are 75% don't iron or hot-air dry until the stain is gone heat sets most stains.
First blot up all the liquid and scrape up all the solids you can use a vacuum be careful not to spread the stain.
Test any chemical you intend to use in a hidden area to make sure it won't discolor or damage the surface
Apply spotter, and work from the outside of the stain in, to avoid spreading. BLOT, dont scrub; strike with the flat face of a spotting brush if needed to help break up the stain
Rinse chemical spotters out with water, blot the area dry and feather the edges. Brush or fluff up pile or nap.
On carpet and upholstery, put a thick pad of toweling over the spot, weight it down with books. and leave it there overnight to "wick up" any remaining moisture.