In Scotland, as in the rest of Western Europe, there were four main ways of acquiring a surname:
Patronymics - The taking of the father's first name. Lowland names such as Wilson, Robertson, Thomson, and Johnson are among the most common surnames in Scotland. 'Mac' names are also patronymic. MacManus means son of Magnus. 'Mc' is just a printer's contraction and has no significance as to etymology.
Occupation - These are names that are derived from trades and occupations and are mostly found in towns. The most common of these is Smith (the most common surname in Scotland, England, and the USA) but other examples would be Taylor (tailor) Baxter (baker), and Cooper (barrel maker).
Locality - In Scotland, the tendency is for people to be named after places (in England the tendency is the opposite). Examples of such names are Morton, Lauder, Menzies, and Galloway.
Nickname - Such as White or Little. These are names that are given by others often based upon appearance or personality traits.