If they are dry, shake them out to remove excess dirt. If they are wet, hose them off to remove mud before you put them in the washer. Machine wash them in strong detergent and hot water. Larger rugs can be washed in larger washers at laundromats. Watch to be sure the load doesn't get off balance.
Line drying, preferably in the sun, is best.
If the rug has a non-skid latex backing, low temperature drying for a short time is possible, but avoid high heat or the rubber will start to deform, melt, and make a mess in your dryer. If the latex backing on a throw rug was worn and beginning to peel off before the flood, the rug may not be worth cleaning up. The backing probably will flake off in the washing machine and create another mess. Non-skid latex backings deteriorate with time and normal use under normal circumstances. Sometimes these rugs hold together well enough to be washed in a bathtub or outside tub and dried outdoors.