It's based on Lenz's law. Now, I may be wrong in some of this as I've figured this much out on my own, but in the pick up itself, you have a permanent magnet. This magnet has a couple of thousand turns of wire around it, so basically its an inductor.
The emf generated in an inductor in terms of electric flux is -ndx/dt where x=flux. So, when you move the guitar string (pick it), the string starts oscillating at the frequency of the note that's playing. Since this string is vibrating where the magnetic flux of the permanent magnet is present, and emf gets induced in it. The frequency of this alternating emf is equal to the frequency of vibration of the string.
This alternating emf induces another emf in the coils of the pick up which is where you get your signal from. The number of turns and the type of pick up thus effects the frequency response (harmonics etc) of the inductor (coils around the magnet) and you get your basic guitar signal.
Now, if the pick ups are humbuckers, there's a noise cancellation effect that happens which also boosts (doubles) the amplitude of the original signal. This is why humbuckers are usually 'hotter' than single coils.
And (I'm sort of rambling now; I play the guitar and I'm doing a project on analog effects), the fabled EMG preamp circuit sort of evens out the frequency response which is why active pick ups have a much 'flatter' sound than the passives.
There are other, much much more accomplished people on this forum who have a significantly better understanding of signal analysis than I do. If there are irregularities in my description of how pick ups work, I'd be thank ful if they pointed them out.