How do magnetic pickups work?
At a basic level: a magnet creates a magnetic field, your steel strings disturb that field when they vibrate, and a coil of wire wrapped around the magnet converts that disturbance into an electrical signal your amp can use. That's the entire concept — everything else is refinement.
The actual physics, briefly
Pickups rely on electromagnetic induction. The magnet (or magnets) creates a static magnetic field extending up through the pole pieces to the strings above them. When a steel string vibrates, it disturbs that magnetic field in a pattern matching its vibration. The coil of fine wire wrapped thousands of times around the magnet converts that disturbance into a tiny electrical current — more vibration disturbance, more signal. This is also why magnetic pickups only work with ferrous (steel-containing) strings; nylon strings on a classical guitar have nothing for a magnetic pickup to sense, which is why acoustic-electric classical guitars use piezo pickups instead.
Why pickup construction affects tone so much
Coil winding count, wire gauge, magnet type and strength, and pole piece spacing all change how the pickup responds to string vibration — how bright, how hot, how much low-end it captures. This is why two pickups that look nearly identical can sound completely different, and why pickup swapping is such a deep rabbit hole for players chasing a specific tone.
Why they can hum
Single-coil designs are more susceptible to picking up ambient electromagnetic interference (lights, transformers, other electronics) because there's nothing canceling that interference out. Humbuckers exist specifically to solve this by using two coils wired to cancel interference while preserving the actual string signal.
Understanding this is genuinely useful the next time your guitar hums, buzzes, or sounds different than you expect — pickups are simple in concept, but small design choices have outsized effects on what you hear.