Hydrodynamics of a submerged hydrofoil advancing in waves