The vibration of a guitar string is complex; there are multiple wave forms going on all at once. There's a simple wave that is at the "root" frequency; this is typically called the fundamental or first harmonic. There are also more complex waves with two, three, four, and more peaks.
All of these waves combine, in different magnitudes, to give the final motion of the string as it vibrates. The energy that the string contains at one frequency can transfer into other frequencies, so the tone of a note changes over time.
The strongest frequencies are usually the lower order ones -- but where you pluck the string, and how you pluck it, can impact this. Tone is very much in your fingers (and much less so in the wood!).
In the graph below, you can see the first, second, third, and fourth harmonic. How these waves combine into the motion of the string is shown in red, while the signal detected by the pickup is shown in green.
The tone that a pickup "hears" depends on where it is relative to the fret and bridge of the string. You can adust the scale length and pickup position in the simulation.
See the video below for a full explanation of this page. And grab a guitar and a tape measure (and the MIDImorphosis app too, if you're curious.)