I detail in my spare time and depending on the severity of the stains there are a couple methods. I know this is kinda long but it should be worth the read.
First if things are not too bad
Vacuum all the loose stuff first
Get you a 5 gallon bucket and put you some carpet shampoo and hot water.
Get a somewhat stiff bristle brush and a car wash mitt.
Get a shop vac
After you vac the car out real good. Take the car wash mitt and get it all lathered up with soap, get it real foamy. Its ok for it to be wet. use the mitt and just work the carpet for a little. Feel free to get more soap or water on it if needed. Next is take your brush and scrub that carpet. I try to sling a bit of water on the carpet when I take the brush out of the bucket. After you have scrubbed for a bit take your shop vac and suck it all up. If the carpet is in not to bad shape you can take you a dry towel and get some of the extra water out of the carpet now and move on to the next section. But if the floor is hella dirty just repeat all the steps as many times as needed. This method will clean most carpets just fine. If you have black grease or oil marks you can also use a degreaser like "Purple Power" or something similar. Just spot clean with that and be sure to test in a inconspicuous area first.
Another neat tip is in your bucket of water...pick up some liquid air freshener and mix it in the water. Your carpet will smell great when your done. After your all done, especially now since its cold out, crack all the windows and let the car run with the heat on to help dry the carpet. A wet carpet will stain again 100x faster then a dry one will. Don't wanna put your nasty shoes on your fresh carpet anyway. If you do have to drive the car, just throw a towel on the carpet. You want to make sure your carpet is dry. If its not dry and you let the car sit with the windows up...it can begin to smell and could cause mold. Which can be a bitch to get out since it will grow in all the cracks.
Now...if the carpet is fucked up! Try this
Strip the interior of the car and pull the carpet out. Clean it at least once like i said above...just do it once you get it out. After that..spray the whole carpet with some degreaser, you may want to cut it with water...all depends on how nasty it is. It doesn't take much so dont try to saturate the carpet, just a good once over. Now agitate it with your brush, do the whole carpet. Also I will mention that the whole carpet should be wet at this point. Again dont worry about it being too wet, water is not going to hurt your carpet. Now your carpet should be pretty well covered with soap. Break out the pressure washer. You dont have to have the pressure cranked to the max and you dont want to hold the wand right up on the carpet. Normally 3-4 inches away is good. start and one corner and just slowly work your way to the other. I normally will stand on the carpet and start at the front this way as I work my way back I am not having to step on the clean part. Take your time! Just work slow and be consistent. As you do this ALL the dirt that is down in the carpet will come out, it will be nasty brown water. You may have to do this a couple times but its not too bad. You want the water to run clear before you are done. Some spot may need extra attention and in those spots you can get closer with the wand. You should have a pretty damn clean carpet by now. Now hit her with the shop vac and hang it up to dry. It also helps if you can do this on a incline this way the water runs away from the carpet.
Dont forget to make sure the back side is clean and dry before you put it back in, dont want to trap water between your floor boards and your carpet. Also very important to make sure the top side is DRY!