How Hungarian surnames began
Hungarian surnames became fixed between the 14th and 16th centuries and were in general use by the 18th century. Many describe an occupation (Szabó, tailor; Kovács, smith), a place, a character trait or a nickname, and the ending "-i" usually means "of" or "from" a place, as in Pataki or Debreceni.
How the names work
In Hungarian the family name comes first and the given name second, so Bartók Béla is Béla Bartók in English order. Traditionally a married woman could take her husband's full name with the ending "-né" (Kovácsné), though today many keep their own name. In the 19th century many families with German or Slavic names "Magyarised" them into Hungarian forms.