That's just title of increasing importance in a feodal society at first.
Here is the list for France and England
Knight - Baron - Viscount - Count/Earl - Marquis - Duke - King
For instance, Savoy was a county, vassal of the Holy Roman Empire. When the emperor visited the capitale, Chambery, the count of Savoy gave such festivities that impressed by its wealth, the Emperor decided to turn the County into a Duchy.
The titles may vary a bit depending on the countries.
The Princes is a bit different, as it can have two meaning.
A prince can either be the sons of the king, or they can be the leader of a principalties.
Principalties are currently very small (the two remaining in Europe are Lietchenstein and Monaco), while a Duchy could be big.