The Tuatha are a group of deities that came from the East and settled in Ireland. It is possible to trace their migration through indo-european languages and etymology. Although the genetics of the Irish people are fairly constant they did accept migrating gods and gave them home in their hills, rivers, lakes and oceans. The deities of the Tuatha were eventually supplanted on the surface by the Mileseans which came from the continent as well. It worked out that the Mileseans ruled the surface and the Tuatha ruled inside the hills and land. The Mileseans were people not deities.
A common mythic structure of the Indo European continent is like this, there are primordial titan like beings who are the land, moon, time, etc itself and create and mold it. Then some gods either their children, or migrating gods of culture and society come along and supplant them to some extent—gods of war, weather, and take over certain parts of the landscape while some of the primordial figures continue to have a role—although somewhat limited by the deities. Then some gods or angels of skill (sometimes pastoral sometimes agricultural, etc), fire and forging, and culture conspire with (certain) humans to put them more in charge and after that the primordials, deities and humans (and other beings like ancestors, fairies, and genius loci) share the power in different ways. Then in some places, like Ireland and Wales, another set of stories show how the deities and the people took on Christianity—by various special events, like St. Brigit midwifing Christ, or Taliesin being at the cross, or the Children of Lir being freed by a Christian priest, or Ossian’s dialogues with St. Patrick. These stories reveal spiritual truths about the evolution of spiritual life for the people and their meeting of various spiritual entities. In most cases in Ireland, there is a settling of the landscape being all shared between the various spiritual figures. None of them go away entirely. Basically Ireland is a very crowded place spiritually, the Tuatha being just one (very significant) aspect of the nation and people.