It depends on the insulation. The closed cell plastic foam insulation types do not soak up water. But not all foams are closed cell.
The glass fiber and paper insulation types will take on the water and will not dry out for years. These types of insulation should have the wet portions removed to a level that is at least 6 inches higher than the water line. Allow the wall to dry before replacing insulation and closing the wall.
Many of the wall finishes, dry wall and wood paneling, will need the same amount removed and replaced.
Then do not close the wall until all the materials are completely dry. Mold and mildew will grow if moisture remains. Wall components will dry rot.
Take a look at this document Resources for Your Flooded Home. It is a long document but has a good section on wall restoration.