Speaking as "McWilliams" myself, the above posters are indeed
mostly correct.
Mac and Ó (in later years, O') are Gaelic in origin - both were used in Ireland, but Mac largely died out there leaving Mac/Mc surnames generally Scottish nowadays, and O' surnames generally Irish. The Mac/Mc names are more commonly Highland surnames but not
always so.
Mac/Mc = son of
Ó, however, is not an abbreviation of "of" as is commonly assumed, but means "grandson of". Mac surnames are generally of a later date than Ó.
The precise descriptive term for these types of surnames is "
patronymic".
The feminine equivalent of Mac is
not "Née" which comes from the French, but "Nic" however it is very uncommon.
"Née" is the feminine version of the past participle of the french verb
naître, which means "to be born" and used in modern English after the surname of a married woman to introduce her maiden name (the name with which she was "born") - e.g. "Mrs Margaret Thomas, née Johnson".