In a country whose system of government is a monarchy, the ruler, or head of state, is decided by inheritance. That is, when a ruler dies their child, or nearest relative, takes over. For much of history most countries were governed in this way, especially in Europe. Some countries elect their monarch instead of using inheritance, like the Holy Roman Empire and Malaysia.