Cavitation is a very deep and involved topic and has been the subject of many an investigation and study over the years. It is also a very interesting thing to look into and one that affects the life of a marine engineer in many ways.
The basic concept is this, if you take a liquid and suddenly reduce the pressure it is under dissolved gasses will come out of the solution and form gasses. Under normal circumstances this would migrate towards the surface and escape but when it is done very quickly the bubbles of gas formed, being created by a sudden reduction in pressure, collapse again as they move away from the low pressure area.
Propellers, be they aircraft or marine, are only a moving aircraft wing in so far as they are an aerofoil shape moving through a fluid and creating lift. In a marine propeller you have the high pressure face and the low pressure face just as you do with a wing. The trouble with a marine propeller is it is very much a compromise. The ideal aerofoil shape only exists for a certain speed so the distance from the shaft coupled to the varying propeller speeds all combine to ensure that the propeller does not get to its peak efficiency. In reality you have varying prop speeds and loading conditions so a propeller can only be designed to suit the vessels characteristics under the majority of its operating conditions.
It is when you get away from these ideals that cavitation becomes more of an issue. People tend to think that cavitation exists only when the slip has become 100% and thrust ceases, which will happen when the prop it turning too fast. Cavitation though happens at all revs and is evidenced simply by the formation of gas bubbles constantly forming and collapsing in the propeller wash. What these bubbles do as they are collapsing is to impinge on the surface of the propeller blades and actually cause erosion. To see a propeller that has cavitated a lot is quite an eye opener. It looks like corrosion/erosion at first but it is more of a pitting effect and can completely wear a propeller away.
I have been on a ship where we had a slight bend in the leading edge of one of the propeller blades, which caused cavitation as this bend sliced through the water. The low pressure area following the bend could be heard inside the ship every time that blade passed the hull and it sounded just like someone was banging on the hull with a hammer on the outside. Hence the significance of the most efficient possible flow through a submarines prop and why you find shrouded props and very clean efficient hull forms at the back ends of subs.
This effect is not only limited to propellers though, it can occur in any environment. One of the most common is inside centrifugal pumps where I have seen cavitation erosion wear an impeller away from a 100kg lump of brass until it looked like a piece of lace!
By the way did you realize that when you crack your finger joints and make them ‘pop’ the noise is actually cavitation inside the joint. The ‘pop’ is the gas bubble collapsing within the joint as you cause a sudden reduction in pressure by opening the joint. The more often you do this the more damage you do to the joint and cavitation erosion will eventually cause arthritis.