Automobiles, like many forms of life on Earth, long ago left the oceans for drier climes; and like most others evolved to land, autos aren't particularly keen on going back to the depths. Whether or not a car runs after a good dunking partly depends upon the engine in question, partly on how much water it encountered, and why it stalled in the first place.
Splashing through deep puddles -- those no deeper than about 6 inches, or slightly above the bottom of the oil pan -- is common enough that most manufacturers build cars to account for it. If a quick dunk into a puddle or a brief splash causes your engine to stall, then odds are water got into something electrical and shorted it. Most low-hanging sensors likely to encounter water -- the oxygen sensors and crankshaft position sensors -- aren't prone to damage by it, but water in the will interrupt the signal they produce. Odds are good the car will start after you unplug the electrical connectors and dry them out.
Immersion Up to the Engine Block
Let's say you live in a flood-prone area and you wake up one morning to find your car standing in about a foot of water -- right up to the engine block or the bottom of the doors, but not past them. If the car refuses to start under these conditions, then it's almost certainly because water has penetrated the lowest-hanging electrical connectors. The car may not start while it's in standing water, but it should be fine afterward as long as the fuse block or computer hasn't gotten wet. Even a completely submerged computer may not be beyond saving as long as you don't send any power through it while it still is wet -- but don't count on it working after you dry it out.
Immersion Up to the Valve Covers
Unless you own a Jeep or a Hummer H1, immersion up to the valve covers is well beyond what the factory had in mind when they designed your car. If your car stalled while going through water up to the door handles or the bottom of the valve covers, you may have more significant problems than those electrical in nature. If it didn't stall because of an electrical short, then odds are that it stalled because water in the pipe created enough backpressure to halt the combustion process. Once the engine stalls, all of that pressure goes away and water comes flooding up through the exhaust system. At the very least, you may expect serious thermal shock damage to the catalytic converter core, and possibly a completely flooded engine.
Total Flooding -- Car vs. Submarine
In the above scenario, where the car stalled with water above the level of the exhaust ports in the engine, then water would flood up through the manifold and into the cylinders. Try to start the car with the cylinders full of water -- assuming the starter works -- and you end up permanently damaging the engine through hydro-lock. Once that happens, your engine is effectively toast. However, say the engine didn't stall until water got up past the intake system. In that case, you're looking at gallons of water sucked into the engine and almost certain hydro-lock. At that point, nothing can save it.
Salvaging the Vehicle
The good news is that as long as your engine didn't go into hydro-lock, there's no reason it shouldn't run after a thorough drying and replacement of the oil and any damaged electrical components. In cases of prolonged immersion, you'll also need to drain the fuel tank and lines. Certain components, such as the computer, ignition module and possibly the ignition coil, are almost sure to go following immersion, but they're replaceable. The guys at BBC's "Top Gear" television program proved this while attempting to destroy a diesel Toyota Hilux pickup truck by dropping it at the bottom of the English Channel and leaving it overnight. After a bit of drying, fluid replacement and electrical work, host Jeremy Clarkson started the truck and drove it home from the beach.