The motion of the strings induces a current in tiny coils of wire.
The current’s size is proportional to the displacement of the string (how hard you plucked it) and the current’s frequency is proportional to the pitch of the string (how quickly it vibrates.)
The induction only happens because there are 6 little magnets in the pickup and the strings are partially magnetised as a result. Motion of a magnet (the string) causes a changing magnetic field and any conductor in a changing magnetic field will have a current induced in it. The equation linking the change in magnetic field (or more correctly, flux) and the potential difference,