1. Whether it is wine, coffee, kool-aid, urine, paint or whatever, the first step is to remove as much of it as possible from the rug or carpet- as soon as possible. Paper towels or a white washcloth will work well. Keep blotting until you have got as much out as possible.
2. After blotting, many spills will require diluting. If it is clear that much of the spilled substance is still in the rug, dilute it with water (assuming that the substance is water-soluble)- as much water as necessary. That may mean a half cup for a small spill or it may mean a quart of water for a major spill. Don’t get the rug sopping wet unless you need to.
Please note that some rugs have unstable dyes that may run if you put water on them. But they are a small minority of all rugs. Sometimes you simply must take a chance.
3. Now back to blotting. Get as much out as possible.
4. If the carpet or rug has become wet in the process, you do not need to panic. Chances are that it can stay wet for at least several days without harm. Still, you will have to manage the wet rug and promote drying. If the rug is quite wet, you may have to elevate it to promote air circulation under it. You might just stuff some wadded up newspapers under it. You may wish to place a fan on the rug to circulate air.
5. Do not use spot removers on Oriental rugs that are formulated for use on wall-to-wall carpeting. They will harm the wool pile of your rug.
If the rug is still stained after all your efforts, consider taking it to a professional rug washer as soon as you can. Or if it was your carpet that was stained, it is time to call an expert carpet cleaner.