Let's say for the sake of discussion that our hypothetical mercenary band existed sometime between the 1300s-1500s in western or central Europe.
Although many premodern professional soldiers fit the current description of "Mercenary" this wasn't necessarily the case at the time.
The Italian word, "Condottiero," for example, is often translated into english as "Mercenary Captain," although a more accurate translation would be, "Contractor." You see, prior to the French Revolution and the creation of the Leve en Masse, most armies recruited whomever was willing to join. Often, individual captains would be given a commission and a purse from which to recruit their company. These Captains were almost always veterans of nearby wars. So Italian mercenary companies were more often than not composed of veterans of fighting in France and/or Germany, where dynastic fighting had blurred the lines who precisely was fighting against who, and individual vassals and the forces they commanded opportunistically backed different sides based on plunder, risk/reward, and who seemed to be winning. So most early soldiers for hire were mounted men-at-arms; men who had been born into landowning families but perhaps stood to inherit little more than a horse and a name. These men were quick to attach themselves to powerful landed lords, offering their service in battle in exchange for lodgings and a place in their retinue.
So first recorded company for hire in Italy in the early 14th century was employed first by the Marquis of Monferrat in northwestern Italy (unsurprisingly, near France). The Monferrat was threatened on the west by the Counts of Savoy and to the east by the ruthless Visconti of Milan. Apart from calling his knights to arms to repel incursions by both the Milanese and the Savoyards, the Marquis Giovanni also hired what amounted to a band of Hundred Years War veterans laying siege to Avignon in southeast France. They were commanded by a German, Alberto Sterz, and an Englishman, John Hackwood. They numbered about two thousand men at arms, who rode to battle but "in the english fashion ("all'Inglese") dismounted to fight (probably due to fear of being unable to replace horses). They were probably also accompanied by archers armed with longbows.
The later appearance of Italian armed bands for hire can be attributed to a sort of snowball effect, as commanders and veterans loyal to them accepted new contracts for employment instead of returning home. At the late date of 1377, Alberic of Barbiano established the first Italian-only mercenary company. Alberic himself was a son of the Count of Cuneo, a vassal of the Marquis of Monferrat, and was most probably present when his father was called to arms in the conflict between Monferrat and Savoy. Instead of returning home at war's end, Alberic, then sixteen, followed John Hackwood and Alberto Sterz as they traveled south to fight for Pisa, a Tuscan city at war with Florence. At this point (the 1360's) the company, called "The White Company" numbered about four thousand knights and two thousand footmen.
In Italy between the 13th and 15th centuries, the Milanese, Paduans, Veronese and Florentines were almost continuously involved in some kind low-level warfare, bullying smaller surrounding towns into submitting in order to establish a ring of fortified burghs around their capital. Oftentimes, these sieges were perpetuated by the Mercenary Captains themselves, who needed to be occupied lest they start pillaging; perpetuating a vicious cycle by which larger, richer cities were constantly hounding out weaker ones.
Of course, armed bands of men were just as problematic when they were just milling about; banditry was a huge issue in France during the Hundred Years War. During lulls in fighting or truces, bands of armed men dispersed all over the country far from home and with no reason to exhibit restraint. In fact, pressing these men into regular armed service to give them something else to do was one of the driving factors behind the Estates General of France agreeing to fund a single professional Royal Army in 1439.
Individual bands weren't often large; Arnaud de Cervole was a particularly charismatic knight and petty lord in the French army and never personally commanded more than a hundred men. However, while pillaging after the Peace of Brétigny, Arnaud rounded up between two and three thousand soldiers and laid siege to Avignon!
Among these two or three thousand soldiers was the aforementioned John Hackwood. He and his companions had ransacked and occupied the castle of Jonville (possibly one of many places of that name on Burgundy) but quickly moved south. A few names of the knights who rode to Avignon with him are known: Bernardo della Sala, Robert Briquet, Esprit, John Creswell, Naudon de Bageran, Lamit, Bataillé, Esparre. Each knight had with him a contingent of men loyal to him, sometimes, as in this case, they sacked together, while other times they would work alone.
to raise the money needed to ransom Avignon, Pope Innocent appealed to several sovereigns. The King of France and Count of Savoy were uninterested, but the Marquis of Monferrat was, on the condition the bandits he paid off would fight for him. Some knights remained in France; Arnaud de Cervole was even hired by King John II of France to hunt down other brigands. John Hakwood and some two thousand men took up the offer, even devastating the town of Pont-Saint-Esprit when looking for other men-at-arms to join their company before crossing the Alps.
So to sum up, for the most part mercenary companies moved swiftly from place to place, and suffered severe desertions if they could devise no ransom or find no employer (although they also faced desertions when they were employed; when several lowland Piemontese towns were occupied by Hackwood in the name of Monferrat and the Savoyards had withdrawn to the mountains resulting in a stalemate, several hundred english soldiers signed up for garrison duty in Crete on behalf of the Venetians). There are also accounts of companies "dispersing" after a particularly resounding defeat. Once the captain earned a new contract, recruitment could begin in earnest again.
Follow-up: What was life as a mercenary like? How long would one expect to be in the business, and under what conditions would one leave?