The presence of a strong magnetic field is a feature common to a significant fraction of degenerate stars, yet little is understood about the field's origin and evolution. New observational constraints from volume-limited surveys point to a more complex situation than a single mechanism valid for all stars. We show that in high-mass white dwarfs, which are probably the results of mergers, magnetic fields are extremely common and very strong and appear immediately in the cooling phase. These fields may have been generated by a dynamo active during the merging. Lower-mass white dwarfs, which are often the product of single-star evolution, are rarely detectably magnetic at birth, but fields appear very slowly, and very weakly, in about a quarter of them. What we may see is an internal field produced in an earlier evolutionary stage that gradually relaxes to the surface from the interior. The frequency and strength of magnetic fields continue to increase to eventually rival those of highly massive stars, particularly after the stars cool past the start of core crystallization, an effect that could be responsible for a dynamo mechanism similar to the one that is active in Earth's interior.