People in ancient times did not use last names the way we do now. They may have identified themselves by adding their hometown: Odysseus of Ithaca. Sometimes they were given what is called an honorific, or a special title, such as Alexander the Great or Antiochus Epiphanes (Antiochus the Great), or they were identified by some physical characteristic or personality trait, such as Charles the Bald and Ethelred the Unready. In some cultures, like the Scandinavians, the suffix "son" was tacked onto the father's name to create a last name: Leif Erikson was the son of Erik. Later, people started to identify one another by their occupations: Edward Smith (a blacksmith) or Charles Potter (someone who made pottery).
Visit the link below for more info on surname origins.