Knowing what "stained" the carpet is the key to removing it. In other words if it is a red dye, like from a soda pop or punch, you need a cleaner specially designed to remove the red dyes. Most other carpet cleaners will only set the stain.
The majority of carpet crud is oil or grease based, from walking through oil stains on the street and parking surfaces, and just good ol dirt. Many detailers use a de-greaser for carpets but this is not what they were designed for. I use a dedicated carpet cleaner/spot remover and then for the dirt a carpet shampoo.
Coffee stains and such require a "tannin" (sp?) remover. Many coffee stains and tea stains look as if they are removed but many times within 24 hours they 'wick" back up from the carpet pad back up through the fibers. This is where a carpet extractor is the ideal tool. It wets the stain and sucks it up it away. I did a test one day where I cleaned a mat with a carpet shampoo, brush and wiped it dry with a towel. Lots of dirt came up and it looked good, so I then used an extractor on it and I pulled up tons of underlying dirt that really made a huge difference in the mats appearance:xyxthumbs
I highly recommend a steam vapor cleaner. This one little tool can act as your carpet steamer and your wet/dry vac as your extractor PLUS you can clean wheels, engines, windows, door jambs and hundreds of other areas. You can get a nice one for about $120.
One last thing, when I get some real dirty carpets and mats I let my pre-cleaners dwell for about 10 to 15 minutes before I scrub them and then extract. This is key to clean carpets.
Anthony