Literally, a Welsh chieftain or leader. From the Welsh verb, tywys "to lead"; plural tywysogion.
In medieval Welsh law a tywysog was simply the holder of one or
more commotes, over which the tywysog would exercise the authority of a
king - each commote was therefore a kingdom in its
own right. The tywysogion controlled the ownership of land, acted as judges and most importantly had the right to demand income from their subject population, either in the form of taxation or tribute.
In practice commotes coalesced
into kingdoms, where one dominant tywysog would be recognised as pre-eminent over the other tywysogion and be recognised as the king, and styled as such, for example, in Latin Rex Genedotae, King of Gwynedd. These combinations of commotes formed the basis for the Medieval kingdoms of Wales, and such kingships were hereditary. It was always important for kings to establish their legitimacy by demonstrating their descent from previous royal houses, irrespective of how they had come to power. A particularly successful tywysog who managed to obtain hegemony over all or most of Wales was likely to be honoured as Tywysog Cymru or King of Wales.
Later, the English, or to be more precise their Norman conquerors, translated tywysog as prince, probably in order to emphasise the subordinate position of the Welsh kings. Hence Tywysog Cymru became the Prince of Wales, and Wales becomes known as The Principality.
Modern Welsh follows this pattern and tywysog becames synonymous with prince and the word brenin has been coined to refer to king. But in the context of Medieval Wales it is more sensible to speak of kings and kingdoms for that is what they were. (And certainly what they were considered to be at the time.)