Having wet carpeting is a terrible predicament to be in. If not remedied quickly, mildew and mold can set in, as well as the general rotting of the carpet. Depending on the location of the carpet and the problem that caused the excess water, this will be an easy or tough task to accomplish. Leaking and broken pipes are one main cause of wet carpets, and must be fixed before you can fully dry out the carpet. Another cause is rain that seeps into your home from under the foundation.
If your wet carpet is on the ground level, you task may be a little easier. Assuming fair weather outside, open up your house and let the air in. A good choice for soaking up water would be a wet/dry vac. You can also employ towels and rags. Then you want to set up some floor fans to keep the air moving and dry. This will be a long process, but given enough time your carpets will dry out. The padding underneath your carpet will also be wet, so even if your carpets appear dry let the fans run for a while longer. Mold can also develop in the padding if left wet.
If the wet carpet is in your basement, pretty much follow the same process as above. It just might take longer, since you cannot open up your house. Open up any windows that are available, to get the outside air. If there are not any windows, you will have to solely rely on the fans, towels, and wet/dry vacuum. If you think the problem is beyond your capability, then you should consider hiring a remediation service.