Circuit approximation of Induction in guitar pickups
The pickup coil(s) are wound around powerful permanent magnets. Since the strings are steel, plucking them modulates this magnetic field at the same frequency as the string.

Some guitars have several pickups to boost the signal, especially for high notes.
The coil picks up these changes in field strength and converts it to a weak signal for the Amplifiers or effects pedals to work with.

The magnets do have a slight pull on the steel strings, which is why several tuning steps is required to keep the strings tight, account for aging, humidity, temperature, etc, then tuned to the exact note they should be in.