Waves lift and drop a floating ball. A steel cable drags a magnet in and out of a coil on the sea floor, and the changing magnetic field induces an alternating potential difference that is sent to shore.
As the ball rises and falls, the steel cable moves the magnet up and down inside the coil.
The changing magnetic field through the coil induces a potential difference: the generator effect. More turns, a stronger magnet or faster movement give a bigger p.d.
The magnet changes direction every half wave, so the current reverses: alternating current. The p.d. is zero at the crest and trough, where the magnet stops.