The carpet and the fibers in the carpet act like wicks. The liquid spilled over the fibers will creep up to the tips of the fibers as they dry. You can also mix 2 cups of water with a tablespoon of vinegar and dish soap. This can work for harder water-soluble stains, such as juice or food coloring.
Even unstained carpets contain dust, dirt and bacteria that routine vacuuming cannot completely remove. Whether you're treating the stain or simply using water, working from the outside in can increase the size of the stain. Instead of trying to remove a stain yourself, the sensible thing to do is to contact a trusted professional carpet cleaning service that knows how to remove stains safely. When water-soluble stains are protein-based, heat or acid can darken them, increasing the chances that they will turn in spots.
It is also essential to know the type of materials the carpet is made of so that attempts to remove stains do not cause further damage. You might think that an old carpet stain would be easier to clean than an old one, but it's actually quite the opposite. Always make sure to dry on your own and never rub the area, as this can cause the stain to penetrate the fibers instead of removing it. An effective treatment for one type of stain may not affect or, worse, have a detrimental effect on other types of spots.