The surname (sometimes called family name) is the name that, in Britain, a person inherits from a parent, usually the father. (In traditional British society, a woman changed her surname when she married. After marriage, she becomes known as "Mrs [+ husband's surname]", which helps explain the idiom "she took his name" to mean 'she married him'. This is no longer always true.) The word surname means, etymologically, the name added on to your own name; it can also help to think that it is the name used when people might call a man 'Sir', or 'Mister'. Schoolchildren usually address their teachers as 'Sir' or 'Miss', but talk about them as 'Mr Wilson' or 'Miss Hawkins' - using their surnames. Everyone in a traditional family commonly shares the same surname - a man, his father, his three sons and their male children will all be "Mr Smith"; his wife and his mother will be "Mrs Smith", and all his daughters will be "Miss Smith" - until they are married. (The feminist influence on our society means that this is less absolutely true than it used to be.)
Surnames are also called family names. This is the name of the family, not the name used within the family (the forename).