Surnames by country
A family name, or surname, is that part of the name of a person that indicates to what family he or she belongs. Originally, family names indicated the occupation or estate of a person: "Robert Smith" would be short for "Robert the blacksmith"; "Mary Windsor" would be short for "Mary of Windsor."
In areas where certain family names are extremely common, extra names are added that sometimes follow this archaic pattern. In Ireland, for example, where "Murphy" is an exceedingly common name, particular Murphy families or extended families are nicknamed, so that Denis Murphy's family were called "The Weavers" and Denis himself was called Denis "The Weaver" Murphy.
In English-speaking countries (U.S., U.K., Australia), people usually have two given names (first and middle), and the family name goes at the end, which is why it's sometimes called a "last name." In Western countries such as France, Germany, and Poland, generally the last name is usually the last name of the father. In general, the mother gives up her original last name (called her maiden name) and uses her husband's last name in its place. More rarely, a hyphenation of both parents' last names, known as a "double-barrel name." Very rarely is the mother's name by itself used.
In Spain and countries of Hispanic culture (former Spanish colonies), each person has two family names: the first is the first family name of the father; the second is the first family name of the mother. As in the case of the English-speaking middle name, the second family name can be omitted or reduced to the initial.
In other cultures, like Chinese, Japanese, Korean, and Hungarian, the family name is actually placed before the given names. So the terms "first name" and "last name" are appropriate only when the last name typically listed is the family name. In many non-English-speaking countries, names are referred to as surname and given name to avoid ambiguity. Some Chinese add a Christian name in front of their Chinese name, so an example would be is Martin Lee Chu-ming (chairman of the Democratic party in Hong Kong). In addition, many Chinese-Americans have an English name which is commonly used and a Chinese name which is used as a middle name, that is to say, Martin Chu-ming Lee.
In non-English languages, and very rarely in English, the surname is often written with all capital letters to avoid being mistaken as the middle name: "Martin LEE Chu-ming" (this practice is common on the Internet), or in small capitals (except the first letter), as "Martin LEE Chu-ming" (this is more common in books) or AKUTAGAWA, Ryunosuke to make clear which one is the family name, particularly often in mass-media reporting international events like the Olympic Games.
In other places like Iceland, most people have no real family name; the last name of a person is a modified form of the first name of the father (a patronymic custom) or, sometimes, of the mother. For example, when a man called Karl has a daughter called Anna, her name will be Anna Karlsdóttir ("daughter of Karl"). Similar customs exist in some parts of India and Indonesia. However, many Indians (from India) living in English-speaking countries give up on this tradition because many English speakers so consistently misunderstand the custom; therefore many Indian fathers simply follow the English-speaking custom to pass on their last name instead of their first.
In Scandinavia, particulary in Sweden, family names often, but absolutely not always, originate from patronymic. The surenames are today passed on similary to family names in other western countries. Karlsson for example means Karl's son, but today Karlsson is a family name, and your father doesn't have to be called Karl if you have the surename Karlsson. In Denmark and Norway family names ending with -sen are common. Karlsen for example means Karl's son. Before 19th century there was the same system in Scandinavia as on Iceland today (se above), with the exception that family name like Bergman, Holmberg, Lindgren etc., also were quite frequent. That is, everyone didn't have a patronymic.
In Russia, names are typically written with both family name and patronymic, a modified version of the father's name. For example, in the name "Lev Ivanovich Chekhov," "Chekhov" is the family name or surname whereas "Ivanovich" is the patronymic; we can infer that Lev's father was named "Ivan."
See also: Most popular family names, family name etymology.