First, you need to fix whatever that floods the carpet. It could be from the sink, broken pipe, plugged toilet that has been continuously flushing or water sprinklers that set off or could be anything.
Then, move all the objects away from your working area as seen in this pictures
And then, just use the carpet shampooer machine to suck the water in. (Do not use that shampooer just the vacuum feature as seen in the picture below)
After you have sucked the water in, just dry it with a blower or a fan. Then return all the objects that you have moved.
That is it. This is me when I was called to the job. :):)
Hope it helps.