/u/SAMDOT's Guide to Feudal Titles
in order from upper to lower nobility
(these are applicable to most European feudal hierarchies in the late Middle Ages)
emperor--A great noble enthroned at the consent of the leading nobility. He is the temporal representative of God's will on earth.
king--A hereditary monarch whose ascension is confirmed by the leading nobility of a kingdom. He is a divinely ordained lawgiver and law enforcer.
prince--A leading noble in a realm, who might vie for kingship. At the head of a powerful household, usually related to the royal family. He is in charge of organizing the local duties of the lower nobility, particularly defense.
duke--A prince who is subordinate to the king, but not part of his family. He owns a large fiefdom referred to as a duchy.
count--The intermediate nobility who may own a fiefdom, referred to as a county, but pledges loyalty to the upper nobility rather than directly to the king. Also referred to as earl.
baron--Smaller landowning nobility.
knight--An individual, of varying statuses, who pledges loyalty directly to a king.
source: The New Cambridge Medieval History
I'll use the Holy Roman designations, they are very different in other countries. There is the emperor, which in later centuries was always held by the Arch-Dukes of Austria. Although we should note that they were technically only King of the Romans (or emperor elect) since after Charles V the practice of receiving a papal coronation was discontinued. Below the emperor we have the Furst (or prince) A Fürst was the reigning sovereign ruler, monarch, of an imperial state that held imperial immediacy in the boundaries of the Holy Roman Empire. On the same sort of rung we have Herzog (Duke) who could have the same rank as a prince, but it depends on the circumstance, the Wittelsbachs of Bavaria were dukes before they declared themselves kings. Generally below Duke and Prince we have the Graf (count) although this is only a rule of thumb since counts such as the Count Palatine (because of their electoral dignity) held much more power than their rank would suggest. Aside from these distinctions we have the electors (Kurfürsten) who elected the Holy Roman Emperor. They were the pre-eminent nobles of the Empire and held prestige above all the others. Hope this helps.
I have a follow-up question if you allow me to ask it. When did this nobility system appear in Western Europe?