Where do surnames come from?
From the moment populations grew large enough that a single given name stopped identifying anyone — and across most of Europe the solutions converged on four sources, which between them account for the overwhelming majority of surnames.
Patronymic — from a father's name. Johnson, Peterson, MacDonald, O'Brien, Ivanov, Martínez, Petrović. Some cultures still form these freshly each generation rather than inheriting them, most famously Iceland, where a person's second name identifies their parent rather than their family.
Occupational — from work. Smith, Baker, Taylor, Cooper, Fletcher, Müller, Lefèvre. Smith's dominance across languages reflects how many specialised metalworkers a pre-industrial settlement needed.
Toponymic — from a place. Either a settlement (Lincoln, Hamilton) or a landscape feature (Hill, Brook, Wood, Atwater). These frequently arose when someone moved: you become "of somewhere else" only to people who are not from there.
Descriptive or nickname-derived. Brown, Little, Armstrong, Russell (red-haired), Cruickshank. These preserve a great deal of otherwise lost vocabulary.
When they became hereditary. In England, gradually after the Norman conquest, spreading down the social scale over several centuries and driven substantially by administrative need — taxation and land records require stable identifiers. Other countries fixed them far later, sometimes by decree, and in several cases the state simply assigned them.
What complicates the tidy picture:
Spelling was unstable until standardised literacy. Variants of one name are usually not different families; they are one family recorded by different clerks.
Migration reshaped names — translated, phonetically respelled, or shortened. The common story that names were changed by officials at immigration points is largely a myth; changes were usually made by the families themselves.
Naming was imposed on enslaved and colonised populations, so a surname's linguistic origin may say nothing about ancestry.
Frequency is regional, which is why surname distribution maps are genuinely informative.