Open any windows in the room with the carpet. The fresh air hitting it is going to help dry it out.
Put box fans in the windows and turn these on high, if the carpet is in a hallway or closed in area, set the box fan at the end of the hallway or area and let it directly hit the carpet. Turn on any ceiling fans you can as well.
Get a dehumidifier going in the room as well to take even more water out of the air, minimizing the potential for mold.
Go over the carpet with a wet-dry vacuum as many times as necessary, emptying as necessary, until the unit no longer picks up water. Lift up the carpet a bit if possible to allow the fan to circulate air underneath to dry more thoroughly.
Continue to let the fans work their magic on the carpets for a few more hours until the carpet is just damp.
Shampoo the carpet with a high-quality shampooing machine to eliminate any lingering dirt and odor.
Keep the fans and dehumidifier going until the carpet is totally dry.
Vacuum the carpet when it is thoroughly dry. Sprinkle baking soda across the carpet and work it in with a broom. Let is set several hours, then vacuum up, going across the carpet in two directions. The baking soda helps eliminate any lingering odors.