The Supreme Leader is elected by the Assembly of Experts and serves for life, although he can theoretically be deposed by the same assembly. Although the assembly of experts are elected by public vote, a certain council of clerics appointed by the supreme leader filters the candidates before the election, so the process is not completely democratic.
Since the establishment of the Islamic Republic of Iran, Iran has had two Supreme Leaders: