OK, my mistake, I thought monarchs are defined by the standard that the heads of the states are inheritage or not, but obviously...(looking at Northern Korea called itself Republic)
Eh, not really. Most monarchies historically had some sort of a mixed system - they
tended to evolve into hereditary monarchy, but it wasn't the only category.
Basically, you have three lawful systems:
Monarchy - rule of one
Aristocracy - rule of many
Democracy - rule of all
And three tyrannical systems:
Tyranny - unlawful / unlimited monarchy
Oligarchy - unlawful / unlimited aristocracy
Mob rule - unlawful / unlimited democracy
And lastly the republic, which is a mixed system that contains elements of monarchy (single head of the state), aristocracy (a body of "chosens") and democracy (rule of the people).
As such, it really doesn't matter
how monarch comes to power so long as it is lawful and with agreement of the people. It can be heredity by birth, heredity by choice (e.g. adoption), election by nobility, election by masses... what matters is that monarch is one.