O'X means grandchild or descendant of X. The apostrophe isn't really necessary. The original Irish form is Ua (ooha)and the plural is Ui (wee), as in the Ui Neills. The personal name of the grandparent is affixed in genetive form, which usually involves internal vowel change -
Niall (ny-ul), but Ua Neill (nayl) etc.
At least, as far as I remember... :)