Hydrofoils let a boat go faster by getting the hull out of the water. When a normal boat moves forward, most of the energy expended goes into moving the water in front of the boat out of the way (by pushing the hull through it). Hydrofoils lift the hull out of the water so that you only have to overcome the drag on the foils instead of all of the drag on the hull.
The foils on a hydrofoil boat are much smaller than the wings (foils) on an airplane. This is because water is about 1000 times as dense as air. The higher density also means that the foils do not have to move anywhere near as fast as a plane before they generate enough lift to push the boat out of the water.
The hydrofoils generate lift only when they are in the water; if they leave the water, the boat will crash down onto the surface of the water (and thus submerge the foils) until the foils generate enough lift to lift it back out.
Like an airplane, a hydrofoil must be controllable in terms of pitch, roll, and yaw. Unlike an airplane, a hydrofoil must also maintain a consistent depth. Whereas an airplane has a range of about 40,000 feet in which to maintain its altitude, a hydrofoil is limited to the length of the struts which support the boat above the foils.
Most commercial hydrofoils are boats with ladder foils (wings stacked one above another with space between them). This configuration is analogous to a biplane. But the reason for stacking hydrofoils is different than the reason for stacking two wings on an airplane.
Ladder foils make the boat easier to control when the water is not flat. If the boat is flying through waves, the wings will generate lift only in the crests; when the boat hits a trough the wings will leave the water and the boat will crash down. When a stack of ladder foils moves through the waves, chances are that some of the foils will be submerged even if some leave the water (unless the waves are really big).
There are two particularly persistent problems faced by designers of hydrofoils: cavitation and ventilation. Ventilation occurs when part of a hydrofoil pierces the surface of the water and air gets sucked down the lifting surface of the foil. Since air is much less dense than water, the foil generates much less lift and the boat crashes down. Ventilation can occur at any air-water interface.Ventilation occurs when air gets sucked down to the lifting surfaces. Although ventilation can occur on vertical struts, 'V' foils are particularly prone to this problem because of the shallow angle the foil makes with the water surface.
Cavitation occurs when the water pressure is lowered to the point where the water starts to boil. This frequently happens with propellors. When a propellor is turned fast enough, the blades generate so much lift (i.e. the pressure on the lifting surface of the blades goes down) that the water flowing over the propellor blades begins to boil. When cavitation occurs, the foil no longer generates enough lift and the boat crashed down onto the water.
Note that a hydrofoil is not a hovercraft. Hydrofoils fly on wings in the water that generate lift whereas hovercraft float above the water on a layer of air. In both cases the boat's hull leaves the water, but the mechanisms by which this is achieved are completely different.