With stains, the faster you act, the better the results. Use a white paper towel or cloth to blot the spill until it's dry, or gently scrape semi-solids. Scrubbing can damage carpet. And never apply heat, as it causes a stain to set.
Test any stain remover or cleaning solution on an inconspicuous area. If no color change occurs, start by working from the edge of the stain toward its center. Apply a small amount of remover to a white paper towel or cloth and blot. Repeat with clean towels until no more stain transfers onto the cloth. Then blot with water to remove the solution, and blot again. Or use a wet/dry vacuum to suck up the spill and stain remover.
Blood. For fresh blood, blot carpet with cold water or 3 percent hydrogen peroxide. If blood is dried, blot with peroxide then try an enzyme laundry detergent solution. Make the solution by following the directions on the package.
Paint. Blot up excess wet latex paint and then blot with a detergent solution of 1 teaspoon mild clear or white dishwashing liquid mixed in 1 cup warm water. If stain persists, try a solution of 1 tablespoon ammonia mixed with 1/2 cup water. For dried paint, try denatured alcohol to soften it. For oil-based paints, blot wet paint with paint thinner. If stain remains, try a cleaning solvent and then the detergent solution. For dried paint, try a paint-oil-grease remover.
Pet urine. If you don't have an enzyme-based pet stain product, blot a fresh stain with ammonia solution. If stain remains, try detergent solution. Then blot with warm water. For a set stain, use a solution of 1/3 cup vinegar and 2/3 cup water, then detergent solution, then water.