I've always wondered what would happen, and have asked my friends a few times, but without a satisfying response.
We actually see this in "Listen", where the TARDIS is opened underwater. With all of its systems working correctly, it simply remains trapped inside its own air bubble with the water held at a safe distance outside.
A substantial number of systems need to be shut down in order to allow water to enter through the doors
∴ Under normal circumstances, the doors can be opened without suffering a catastrophic influx of water
DOCTOR: No, how can we with the Master in the Tardis? They're a retiring people. They like a quiet life. There's no telling what a creature like that would do on Logopolis.
ADRIC: So how do we flush him out?
DOCTOR: And there's no saying what that might do to the Tardis systems. Can you swim?
DOCTOR: Good. Materialise the Tardis underwater and open the door.
(Down in the Cloister Room, Tegan walks round the police box. The door opens invitingly. The Doctor calls up an aerial view of London on the scanner.)
DOCTOR: That's the River Thames. We'll put down there.
ADRIC: And water sluices in and floods out the whole Tardis.
DOCTOR: Yes. Adric, shut down everything. Fold back the Omega configuration. (Adric gets on the floor underneath the console.)
ADRIC: Folded back.
DOCTOR: Good. Exponential cross-field?
DOCTOR: Good. Pathways to conditional states seven to seventeen?
DOCTOR: Excellent. Main and auxiliary drive?
DOCTOR: Good. Now, we're partially materialised, so there'll be a slight jolt. Are you ready? ADRIC: If you are.
DOCTOR: What? Well, I'd feel more confident if you just said yes.
DOCTOR: Good. Here we go, then.
[Cloister room] (Tegan gets jolted.)
TEGAN: This is too much!
DOCTOR: A gentle splash-down.
(Thud! They fall to the floor.)
DOCTOR: We must have touched bottom.
ADRIC: Touched bottom?
DOCTOR: Yes. Good thing the water was there to break our fall.
TEGAN: Crazy idiot of a pilot! Wait till I have a word with him.
(Laughter comes from the open door of the police box.)
TEGAN: Who's that?
(The Doctor is standing braced across the doors.)
DOCTOR: Careful, now. The water pressure could send us both flying. Ready?
(Adric presses a button and runs to join the Doctor. The doors do not move.)
DOCTOR: That's odd. There's no pressure on those doors at all.
ADRIC: Perhaps we aren't down very deep. (The doors swing open and they step outside [onto dry land])
Since it's never happened on screen, any answer would be pure speculation. However, since we've frequently seen the Doctor open the Tardis door in deep space - in both classic and modern series - without the air rushing out, we can speculate that the same force would stop the water rushing in.
In the episode The Beast Below, the Doctor references an "air shell". This allows a sustainable environment for the TARDIS and the residing occupants to have the ability to open the doors and be on the immediate outside.
The reason we often see the TARDIS constantly filled with water, I presume, is that the air field must be enlarged manually, otherwise it is automatically at a minimum. Or it just looks cooler.
In Logopolis the fourth Doctor tried to land the TARDIS underwater in order to flood the TARDIS. Unfortunately we never saw what happened as the TARDIS materialised on a barge instead of dropping to the bottom of the Thames.
We see this at the start of Series 8, Episode 4 "Listen" where The Doctor does open the TARDIS doors underwater.
Nothing happens. The TARDIS maintains a shell around it which doesn't let any water in.
XKCD No. 969 addressed a very similar question for the first Narnia book, "the lion, the witch and the wardrobe".
Randall Munroe of XKCD has also estimated that it would take very long time to drain the ocean (Thanks b_jonas)
TECHNICALLY, in the episode with Donna Noble, when she opened the TARDIS when David Tennant was Doctor, she asked why they were breathing. The doctor replied with the fact that there was an oxygen field surrounding the TARDIS, which would also mean that no water would be able to get inside when the shields are up.