Elective monarchy
An elective monarchy is a monarchy ruled by an elected monarch, in contrast to a hereditary monarchy in which the office is automatically passed down as a family inheritance. The manner of election, the nature of candidate qualifications, and the electors vary from case to case. Historically it is not uncommon for elective monarchies to transform into hereditary ones over time, or for hereditary ones to acquire at least occasional elective aspects.
Evolution
Many, if not most, kingdoms were officially elective historically, though the candidates were typically only from the family of the deceased monarch. Eventually, however, most elected monarchies introduced hereditary succession, guaranteeing that the title and office stayed within the royal family and specifying, more or less precisely, the order of succession.
Today, almost all monarchies are hereditary monarchies in which the monarchs come from one royal family with the office of sovereign being passed from one family member to another upon the death or abdication of the incumbent.