Stop the water and act fast
The clock starts the moment carpet gets wet. Mould and mildew take hold in the backing and the pad within 24 to 48 hours, so speed matters more than anything else. First stop the source — a leak, an overflow, a spill — then move furniture off the wet area and lift anything that can bleed onto the carpet, such as rugs or cardboard boxes.
Get the water out
You cannot dry carpet that is still holding water, so extract as much as you can first. A wet/dry vacuum pulls out the most; failing that, press towels down hard and wring them out, working across the area until little more comes up. The more water you remove now, the faster the rest dries and the lower the mould risk.
Dry the carpet and the pad
Then move air. Open windows, run fans across the carpet and a dehumidifier in the room, and add gentle heat to speed evaporation. The pad underneath is the slow part and the real mould risk, so for a badly soaked patch, pull back a corner of the carpet to let air reach the pad, or lift it to dry both sides. Keep going until it is dry right through, not just on the surface.
When to call a professional
Some wet carpet is past a home dry-out. A large flood, water that has sat for more than a day or two, a pad soaked right through, or any sign of mould needs professional extraction with commercial air movers — and often the pad lifted and replaced. Do not wait and hope; trapped moisture only gets worse, and more expensive, the longer it sits.
Flood water is different — do not DIY it
Water from a clean source, such as a burst supply pipe or an overflowing sink, you can start drying yourself. Water from a sewage backup, a storm, or anything that has run across the ground is a health hazard, carrying bacteria and contaminants no home dry-out makes safe. Treat that carpet and pad as contaminated: stay off it, and have a restoration professional handle it or remove it.

