Scottish surnames fall into two broad groups: Gaelic names of the Highlands and Islands, and Lowland names that share much with northern English ones.
Mac and clan names
Names beginning Mac or Mc mean "son of": MacDonald, MacLeod, MacKenzie. Mac and Mc are two spellings of the same prefix; neither is more correct. Clan names often became surnames shared by many people who were not blood relatives, since tenants and followers took the name of the chief. Having a clan name therefore shows an association, not necessarily descent.
Lowland and Borders names
Lowland names such as Armstrong, Elliot, Scott, Douglas and Stewart were formed from places, nicknames and occupations as elsewhere in Britain. Stewart began as an office, steward of the royal household.
Patronymics and spelling
Gaelic names were written in English by sound, so MacGregor, McGregor and Gregor overlap. In the north-east and Northern Isles, patronymics such as Williamson and Robertson are common.
Records
Statutory registers of births, deaths and marriages began in 1855 and are held by the National Records of Scotland, searchable through ScotlandsPeople. Old parish registers go back, for some parishes, to the 1500s. Wills and testaments, kirk session records and valuation rolls help to fill the gaps.