The foils use the Bernouli effect to generate lift and raise the vessel's hull out of the water. Hydrofoil vessels have to travel at high speed before the foils can be effective. Hydrofoil vessels consume a great deal of fuel.
Hydrofoil vessels have seen use as high-speed ferries and as patrol craft -- roles where their high fuel consumption has not as significant.
None of the several navies that built hydro-foil equipped patrol vessels still uses them.