Logistics, the art and science of supplying troops, was a lost art and an inexact science during the Medieval period. The Romans had truly mastered the art of military logistics, but these lessons were among the many things the barbarian successors to the Romans did not adopt for themselves.
The Roman system wasn't perfect. Money problems, enemy action, or communications foul ups would sometimes leave the troops lacking key items. But when compared to their opponents, the Romans were much better off. Roman opponents were either barbarians, who stole what they could find in the areas they passed through, or ill organized kings who at best made haphazard arrangements.
Assurred of regular supply, Roman troops could more easily survive being under siege, or reduce enemy fortifications themselves without worrying about starving. Well supplied Roman armies could march hither and yon for months at a time while their ill-organized foes would see their troops getting hungry, and shortly thereafterwards deciding to go home (with or without permission). Few of the armies Rome faced over the centuries had efficient logistics and were thus under a lot more time pressure to reach a decision before their troops starved or, more likely, quit the field.
Unless you had a logistical system comparable to the Romans, and few Medieval armies did, you had to live off the land. This could have dire consequences. Each man needed at least three pounds of food a day, and each horse twenty pounds of feed. If these requirements were not met, the troops would first go hungry and then most of them would either desert or, if you were far from friendly territory, starve to death or be picked off by enemy troops..
The horses could be grazed, but then there would not be much time left to travel far. This might not be a problem if the troops were spending a lot of time wandering afield looking for food, a practice armies call foraging, but peasants usually termed plundering. As this was often the case, it meant that armies moved along at a rate of only 5-10 miles a day. Armies could not forage more than sixty miles from their line of march. The mounted forage parties (a dozen to some hundreds of men and pack horses) had to be able to range outward to steal food and then get back in a reasonable time, thus the sixty mile rule of thumb,. A large army, numbering over 20,000 men and even more horses, would advance at that 5-10 mile a day speed and literally strip an area ten or more miles wide of all food and fodder (grass and hay). Anyone coming into that area a few days later would find a wasteland. The local peasants would have fled, or be starving in their hovels. This was a wasteful process. Usually as much, if not more, food was wasted by such methods as was collected for the use of the army. It was for such situations that all those castles and walled towns were built. When an army approached, even if it was just passing through, the peasants tended to flee to the fortified areas, taking any food they could carry with them. Anything they couldn't take would be gone once the army passed. These troops would usually not be able to get into the fortified places, thus the peasants could later emerge with what food they had saved and try to pick up the pieces of their lives. If they had crops growing, whatever the army's horses hadn't eaten could later be harvested. Even with that, it was a disaster for the locals, with many destined to die over the coming Winter from malnutrition. Armies on the move killed far more civilians than soldiers, and the troops did just that by moving about and eating up all the food they could lay their hands on.
Medieval armies could support themselves, and move twenty or more miles a day, if they were near a coast or river and had ships to carry the supplies. But moving overland, any transport would be pulled by animals that also had to be fed, either with grain they carried or by grazing the animals most of the day. It wasn't until railroads were introduced in the 1800s that this changed.
Medieval troops could carry about a weeks' worth of food with them, but only for the troops, not for the animals. The animals would still have to be allowed to munch on grass and hay for at least four to six hours each day.
Some Medieval generals were up to the task of managing logistics, but there were few. One of the outstanding examples was Richard the Lionhearted, king of England in the laye 12th century. Richard led a large army on Crusade to the Holy Land. Previous Crusader armies had suffered greatly from a lack of logistical planning. Moving through hostile, and often barren, country, several Crusader armies had literally fallen apart from lack of food. Richard arranged for supplies to be accummulated and ships used to deliver them to his troops as they marched along the coast. He thus managed to defeat Saladin, the great Moslem general. Unfortunately, Saladin also understood logistics. When Richard finally had to march inland to besiege Jerusalem, he found that Saladin had stripped the country-side bare of food and fodder. The wells had been poisoned and Richard realized that his army would fall apart from starvation if he tried to besiege Jerusalem. The Crusaders had to settle for a treaty with Saladin that guaranteed Christian pilgrims access to the Holy Places. This was also a classic example of two able, and well matched, generals checkmating each other and then negotiating an agreement that left both able to claim a victory. This sort of solution was also quite rare, given the shortage of competant military leaders in the period.
Many Medieval generals looked after logistical arrangements, but this was considered exceptional, if not a bit eccentric. Each soldier was expected to tend to his own supply needs. This was sometimes done by purchasing food from the locals, but soldiers on campaign habitually took what they wanted. This was especially true when they were in enemy territory, where the thefts were considered part of the damage they were inflicting on their foes. An army was considered well organized if it set up regular foraging parties from each major contingent, rather than simply allowing the troops to wander all over the place for a meal, often getting into disputes with other members of their army over who was to have what.
While this do-it-yourself supply system saved the army leaders a lot of money and administrative headaches, there were numerous drawbacks as well. For one thing, foraging (as this looting and pillaging was called) for your food was time consuming, not always successful and sometimes dangerous. Many of the locals were armed and if they were feisty and determined, your foraging parties would either have to be quite large or risk getting chopped up. The main purpose of setting up organized foraging parties was to reduce your own casualties from irate, and organized, locals. A Medieval general also had to ensure that the primary business of war, moving towards the enemy and being ready for battle, was not subordinated to the need to find food.
Experienced, or simply wise, generals sought to keep the peace in areas their armies were passing through by doing the foraging on an organized basis. The local officials were contacted before the army arrived and told that if they supplied certain amounts of food, at specificed times and places, the troops would be kept under control. This last statement, in Medieval terms, meant that the army leader had a proclamation read to all the troops warning that anyone caught abusing the locals would be summarily dealt with. The penalties were harsh, and some hangings were the usual result. The miscreants were strung up in a public place, so the locals knew that they were getting "value" for the supplies being extracted from them.
Troops pillaging was a problem even, or particularly, in your own territory. While your troops might owe allegience to you, the only civilians they felt a kinship with were those from their own village. So if they were marching through another one of your villages many miles from their own, the troops felt they were still moving through "alien" territory and tended to act accordingly. This attitude persisted until quite recently, and well into the last century there were areas of Europe were the peasantry used the word foreign" to describe people from the next village. Again, control could be maintained if supplies were forthcoming and the soldiers were read the warning "do not abuse the population." In your own territory, supplies would be obtained either by outright purchase (arranged by your officials governing the area.) or by resorting to the obligations an area had under feudalism to provide supplies to its overlord and his servants whenever he came to visit. If the lord came by with several thousand troops, the locals could do little but mutter and comply. Usually, since the overlord did not want a dangerous drop in loyalty in the area, a portion of the supplies would be paid for and great care taken to insure that the troops did not get out of hand. While this reduced the amount of food in the area, it left a lot more than foraging would have. Indeed, with proper management a given area can usually feed an army equal to its own population for a week or two without undue hardship to the local folks.
Then, as now, men tend to change their attittudes towards property rights once they are armed and organized into groups. In Medieval times, there were no police departments or media to report atrocities. A few dozen soldiers could come apon a village of a hundred or so people, thoroughly trash the place, abuse the women, steal everything portable, and kill a few of the inhabitants, and no one would know about it except the surviving villagers and, eventually, other villages in the vicinity. The soldiers, if they kept going, would literally get away with murder (not to mention theft, rape, arson, and assault). The Medieval soldiers knew this, as did the civilians. Unless the leader of the army the troops belonged to was keen on protecting civilians, nothing would be done to discipline the marauding soldiers. The prospect for "plunder" was used to attract men to military service. If a general had a hard time meeting his payroll, and many did, the troops could be kept in service by providing ample opportunity for plunder. This solved the payroll problem, as well as the logistical one.
The Medieval approach to logistics continued into the 17th century. But the 30 Years War (1618-1648) so devastated central Europe and the Rhineland that "foraging" was abandonded for good (with some lapses during the Napoleonic Wars of the late 18tth and early 19th centuries). Even before the 30 Years War completely discredited foraging, the practice fell into disuse in France and England as a result of the rampant campaigning and free lance brigandage during the Hundred Years War.
One could say that one of the darker aspects of the Dark Ages and the Medieval period was the loss of the Roman logistical system which led to a dependence on foraging to supply armies. It's probably no coincidence that the beginning of modern times, "the Age of Englightenment" (late 17th century to late 18th century), included among its many accomplishments the abandonment of foraging as an official government policy.