The relationship between the title of "king" and "emperor" in the area that is today called Germany is just as complicated as the history and the structure of the Holy Roman Empire itself. The following remarks may or may not clarify things a little (for details, refer to the Holy Roman Empire article):
The Holy Roman Empire (although only titled as such much later) started out as the eastern section of the Frankish kingdom, which was split by the Treaty of Verdun in 843 (while the western section eventually became France). The first rulers of the eastern area thus called themselves reges Francorum, kings of the Franks. A reference to the "Germans", indicating the emergence of a German nation of some sort, did not appear until the 11th century.
For most of the time, at least until 1508, becoming king was a prerequisite for becoming emperor. The kingdom was never entirely hereditary; instead, ancestry was only one of the factors that determined the succession of kings. The king was formally elected by the leading nobilty in the realm, continuing the Frankish tradition. With the Golden Bull of 1356, a collegiate of Electors was formally established which elected the king. Following an election, a King did not assume the title "Holy Roman Emperor" until crowned by the Pope.
In 1508 Maximilian I, who had not yet been crowned by the Pope, announced that henceforth he would use the title of "Emperor-Elect", which was used by all succeeding emperors. His successor, Charles V, was the last emperor to be crowned by the Pope - henceforth, all Holy Roman Emperors were merely "Emperors-Elect". At the same time, the chosen successors of the Habsburg emperors began to be elected as "King of the Romans" during their father's lifetime.
Conrad I
With the death of the last Carolingian king of East Francia, Louis the Child, the East Frankish nobles elected a replacement. Conrad came from a family as old as the Carolingians, and which had established substantial connections in East Francia.
Francis II, emperor 1792-1806, after that Francis I of Austria
In 1806, the Holy Roman Empire collapsed under the military pressure from Napoleon I of France. From 1806 until the foundation of the 1871German Empire, there was no single leader of a united German territory.
The pope's crowning of Charlemagne as Augustus in 800 formed the example that later kings would follow: it was the result of Charlemagne having defended the pope against the rebellious inhabitants of Rome, which initiated the notion of the Reich being the protector of the church.
Germankings had been elected since time immemorial: in the 9th century by the leaders of the five most important tribes (the Franks, Saxons, Bavarians, Swabians and Thuringians), later by the main lay and clerical dukes of the kingdom, finally only by the so-called Kurfürsten (electing dukes, electors).
The difficulties in electing the king eventually led to the emergence of a fixed college of electors, the Kurfürsten, whose composition and procedures were set forth in the Golden Bull of 1356.