How were mercenaries hired during medieval times?

by SirRettfordIII

I understand that during large wars and campaigns many kingdoms hired out mercenaries to bolster their forces alongside trained knights and conscripted peasants, but how were those mercenaries hired or selected to fight in those wars? Were they already know to kingdoms through some sort of guild registration? Did someone from the kingdom go around asking for mercenary companies looking for work? In various video games and fantasy novels, there is usually a Adventurer's Guild where adventurers/heros for hire/mercenaries can register for quests, was it something like this?

hedgehog_dragon

Other people might be able to add more, but I asked a similar question a while ago - This answer includes information about how the captains would find employers

EDIT: A bot suggested I link the original author of that answer, u/PartyMoses