In a given compartment there are two icons. The icon on the right identifies, well death, complete flooding. The icon on the left identifies the water being pumped out. In short, you want the icon on the left to count down before the one on the right does.
As mentioned above, it absolutely helps to have crew in all compartments that are damaged. Crew within damaged compartments do lend a helping hand too
edit: crude one too many posts and now I have this really wrong avatar.