The Hydrodynamics of Cavitating Flows