Firstly, there is the distinction between inherited versus conferred titles. Inherited titles passed more or less automatically from parent to child, e.g. King, Duke, Baron, Viscount.
Conferred titles were granted as rewards for merit -- e.g. knight or as temporary offices -- or powers -- e.g. viceroy (in the stead of the king).
Inherited titles were attached to land or, very rarely, some other kind of economic asset like a harbor or fishing rights. Our current use of the word "title" to mean proof of ownership comes directly from the titles of aristocrats. Just to confuse things, titles could be bought and sold, might be seized by the king because of some real or fictional offense, or won or lost in battle.
Titles were so important that they became an individual's legal and cultural formal identity, e.g. the Earl of Essex. All obligations of fealty, military service, taxes, protocol, etc. attached to the title, not the individual. Any particular individual could have a vast array of titles. In fact, one could argue that "collecting titles" was the primary occupation of nobles.
To the extent that noble titles had actual ranks, they expressed the degree of fealty the holder is required to give to another noble, usually the king, in the form of military service. The granting of fealty was very much a business deal and really had no defined hierarchical structure. Most nobles owed fealty and its military service to the King because the King was the strongest noble around, but they might also pledge or inherit fealty to another noble for various reasons. Fealty was not always hereditary in theory, much less practice.
Since fealty really established chain of military command, ranks and deference depended on fealty instead of title. So, if a Duke also held the title of Baron of some little backwater and that that title of Baron came with an obligation of fealty to a Count, then the Duke would be obligated to follow the orders of the Count and to defer to him in matters of status and protocol... in theory. In reality, Dukes were usually richer and more powerful than Counts and the Count wouldn't bring the matter up.
Dukes held titles that, in legal theory, made them independent of the King but they pledge their fealty anyway...sorta, kinda, maybe on a good day. Earls, Counts and Barons started out as various Germanic military ranks with lesser grants of conquered land. However, by the medieval era, this had become all muddled and a Baron might have more land, wealth and military power than an Earl.
Secondly, as for promotions, since titles weren't really ranked, there weren't any. Most nobles lived and died with their inherited titles. The only situation analogous to promotion occurred when a King or other high noble found themselves holding titles because of conquest, treason or because a line had died out. (One of the special powers of the English crown was that titles "reverted" to the crown if there were no male heir.)
Kings could parcel out or recombine these titles and their associated lands to "create" a new title of nobility and confer that title on this or that individual.
It might look like a promotion to modern eyes to read that a the Baron Strange was created by King Henry the Nth, the Earl of Nonsuch, for services in the Third Bloody Stupid War of Godforsaken, but really he was just being paid for service in land. The individual was still Baron Strange, but now he had that nice piece of Nonsuch as well. If the title of Baron Strange owed fealty to Count of Down, then, even though the individual now also held the title of Earl, would in his persona as Baron Strange, still have to demonstrate the rituals of fealty to the Count of Down.
Still, as lineages rose in power, the size of their titles usually rose and fell in tandem. That would also look somewhat like promotion and demotion to modern eyes but since titles were land and land was wealth, it was really just their bank accounts rising and falling. (Only in later times, when noble titles began to lose their real practical power, did you find ruined nobility with titles but no wealth.)
But all of this is just rule-of-thumb stuff. You have to remember that this was a constantly evolving system that grew over the course of a thousand years and crossed over numerous political, legal and cultural lines (even in relatively isolated England.) As such, the rules for handling titles were constantly in flux and depend strongly on what particular when and where you examine.
More importantly, legalism and custom were often merely fig leafs for brute force, murder and bribery. Every single "noble" title traces back to a successful act of violence. As long as titles had real economic and military force, they continued to be apportioned largely by implicit or explicit threats of violence. There never was any real system of law, as we would understand law today, controlling who had what title. Political marriages, battlefield victories and the odd poisoning or infant strangling, led to more "promotion" than any "noble" deed.
Despite all our romantic associations, at their heart, the aristocrats were never anything but a caste of thuggish killers who trained for warfare incessantly, fought wars purely for profit and oppressed the great majority of the population cruelly. If we weren't the inheritors of centuries of pro-noble propaganda, bought and paid for by nobles, the word "noble" would have connotations of "drug dealing mob thug" instead "representing highest virtue."
Bleh.
Until the Glorious Revolution and the installation of William the III of Orange by parliament on the English throne, even the politics of merry old England look distinctly lawless and more like the revolving series of coups in the 3rd world today. It was not until the "commoners" finally rose up and gutted the power of the aristocracy did titles of nobility acquire some sort of moral legitimacy by modern standards.