From what I understand it is a hierarchy. A count would be responsible for a county per say and then a Duke would be in charge of a series of counts, as well as holding their own lands. This is then followed by Kings, who commanded Dukes and Counts under them, which of course would then be surpassed by Emperors who had kings under them.
This is super rough and things change a lot depending on when and where you are talking about, but that's the gist of the hierarchy.