Surname, family name and last name
Surname and last name both imply position, assuming a construct of "given name, family name". This doesn't work in countries that reverse this to "family name, given name", like China. Using "family name" and "given name" avoids the confusion of having last names first and first names last.
"Last name" is the name that comes after the first and middle names, and is used in titles i.e. Mr. "last name" or Miss "last name".
Although "surname" is generally understood as the "last name", and used in titles, this is not necessarily so: Here's a definition of "surname":
a name added to a person's name, as one indicating a circumstance of birth or some characteristic or achievement; epithet.
"Family name" is one that is shared with the family, but is not necessarily the surname.
A good example to sum all this up would be the name of the main character of Kidnapped, David Balfour of the Shaws.
His family name is the Shaws, but he is addressed as "Mr. Balfour". His surname, in this case, is the same as his last name.