Detail of the generator. The water ran through the turbine and turned the inner wheel. The magnets were attached to that wheel, and as they passed by the copper wire that was wound around those teethy things, electricity was generated.