Taoiseach [TEE-shuck] is the official title of the head of government in Ireland. Under the Gaelic system of rule in ancient Ireland, the taoiseach was the head of each land-owning Clan (extended family) chosen to lead for his lifetime. Clans were in turn nominally subject to regional Kings - the four modern provinces of Ireland (Munster, Leinster, Connacht, and Ulster) are roughly analogous to the four Kingdoms of the same names. All were in turn nominally subject to the High King of All Ireland, who traditionally resided at the Hill of Tara in County Meath, about 100km north of Dublin.
Tánaiste [TAWN-ish-te] is the official title of the deputy head of government. Under the system described above, a tánaiste was chosen to act as deputy and 'emergency replacement' to the new taoiseach. The position of tánaiste often went to the representative of the next most powerful faction within the clan to minimize disputes and ill-feeling over failing to secure the position of taoiseach.