Most surnames originated with fathers' names, place names, occupations, social ranks or distinguishing personal characteristics. Surnames came into use in Europe in the Middle Ages as a means of distinguishing between people with the same first name and became hereditary over time.
The earliest surnames belonged to members of noble families, who often adopted the names of their ancestral castles or towns. Before about 1500 C.E., a person's surname might change after the person moved or changed jobs. Even after surnames became hereditary, people with the same common ancestor might have differently spelled surnames because of variations in the ways local clerks or priests recorded them.