This title usually results from a merger of a royal and imperial crown, but recognises the two territories as different politically and culturally as well as in status (emperor being a higher rank than king).
Another use of this dual title was in 1867, when the multi-national Austrian Empire, which was German-ruled and facing growing nationalism, undertook a reform that gave nominal and factual rights to Hungarian nobility.
This reform revived the Austrian-annexed Kingdom of Hungary, and therefore created the dual-monarchic union state of Austria-Hungary and the dual title of "emperor-king" (in German Kaiser und König, in Hungarian Császár és Király).
Hungary enjoyed some degree of self-government and representation in joint affairs (principally foreign relations and defence).
William wanted to be proclaimed Emperor of Germany (Kaiser von Deutschland), but this would have caused sovereignty problems with the southern German princes and also with Austria.
After the devastating loss in the First World War and the German Revolution, Emperor William II attempted to abdicate the throne of Germany while retaining his throne as King of Prussia, believing the Kingdom of Prussia and the German Empire to be in a personal union.