For a diagram that works for both cases see the figure below.
A motor like a generator is composed of two parts, a stator that creates an external magnetic field (B in the figure) which is constant over time and a rotor that is made of a coil.
In the case of a motor, the the coil is supplied with a current I from an external voltage source. This current interacts with the field B and generates a force `F = I*(B xx L)` that rotates the coil.
In the case of a generator, the coil rotates in the field B because of an external applied torque (or equivalent said, force). Thus the surface of the coil that is intersected by the field B variates over time, hence the total flux of the field B through the surface S variates over time `Phi=B**S =B*S*cos(alpha)` , therefore there will be an induced voltage (or equivalent said, current) in the coil.
`U_("ind") = -(d(Phi))/dt`