Irish last names reflect the long history of the island of Ireland, from the days of the Celtic High Kings through successive invaders to modern times.
The prefix 'mac', meaning 'son of', was used. So Kieran mac Fiachra was Kieran the son of Fiachra, and his son might be Darragh mac Kieran ie Darragh the son of Kieran.
Alternatively, the prefix 'O' (or the older form 'Ua') was used to mean 'grandson of' or 'descended from'. So Kieran O'Conor was the grandson or descendent of Conor. While Oisín O'Laoghaire was a descendent of Laoghaire.