To grossly over-simplify, guitar pickups are permanent magnets that are coiled with copper embedded underneath the guitar strings on your guitar.
These coiled magnets create a magnetic field which then detects disturbances in the movements of the strings and transfers that signal to an amp.
If your eyes are glazing over, I empathize. Seriously, I do. The rest of this post will clear up the mystery of guitar pickups. Let's hit it.