If somebody like a king of Bohemia claimed to have been descended from every king before him, how would the first king have become a king?
This is a super broad question. The Merovingian line ended when Pepin the Middle basically just started ruling France. His Son was granded Kingship by the Pope... and started the Carolingian dynasty.
In your Bohemian example a "prince" went conquering, and eventually the offspring raised themselves to Kings. That's the norm. Once a principality gets big enough and the dynasty endures enough generations without falling apart, they start styling themselves as "kings" ..and the precedent is set.
This is very vague and generic. But take a look at how the Tudors took over after the war of the roses. Once Henry was in power they used old Welsh titles to validate their rule over England. They did in fact rule, it was just a matter of cementing the legitimacy.
Sorry for oversimplifying, this question is so broad the specific examples are outside of my expertise.
So to bring it back to Bohemia: There were the Přemyslid Dukes, who were raised to be Přemyslid Kings by the King of Germany, and was then confirmed by the 1212 Golden Bull of Sicily. Once the title was official, people could claim it (the last were the Hapsburgs who had a similar story of going from Counts to Princes of Austria to Holy Roman Emperors to Emperor of Austria, King of Hungary and King of Bohemia, etc. etc. etc.)