For water and latex-based paint:
Try to blot the paint out, as this will diminish the surface area which has paint on it. Place a damp towel over the wet blotting area – repeat this step and continue to blot until you can’t see any more paint. Place a few dry towels on top of the wet towels and press down, soaking up as much excess liquid as possible. Use a solution made of vinegar and water (1/2 cup each) to wipe down all paint. Vacuum the area after everything has dried.
For oil-based paint and ink:
Place a few dry towels on top of the wet blotting area. Use mineral spirits on paper towels to blot the paint as much as possible. Apply a thick layer of shaving cream to the affected area and let it sit for ten minutes or until you can wipe most of it away with a new dry paper towel. Use dish soap mixed with water (1/2 cup each) to wipe down all remaining paint and ink. Rinse the area with clean water. Repeat this cleaning process one more time.
If the paint still isn’t coming out, you may need to call in a professional. You can go to a carpet cleaning store, or you can contact a professional carpet cleaner (a number of them advertise on Craigslist in different cities). The cost will vary depending on how much work it takes. It could be $300, $500, $600…etc.