Cavitation typically occurs when the local pressure in a liquid drops below its vapor pressure, causing the formation of vapor-filled bubbles. These bubbles can grow and move within the liquid, and their collapse can generate intense localized energy, affecting both the liquid and surrounding materials.