From 1315 through 1322, northwest Europe was wracked by bad harvest after bad harvest, on top of epidemics ravaging livestock in some years. A generation of Europeans starved to death. But William Chester Jordan's studies of the Great Famine's cultural impact turned up something really interesting: for the first year, it was hardly noticeable. He concludes that the frequency of famine, as attested in chronicles theoughout the Middle Ages, had led medieval people to develop procedures for storing, preserving, and consuming food in patterns that enabled most people above the barest subsistence level to stock and/or acquire food for several seasons to a year of bad harvest.
The biggest sirprise for modern students of the Middle Ages, I think, tends to be the small role played by fruits and vegetables in the medieval diet. Modern people who have the privilege and luxury to spend time reading about the Middle Ages tend to align pretty closely with the class of people who hear a lot more about overconsumption of food/calories as a problem than under. We have basic knowledge or nutrition, vitamins, and now antioxidants. We value vegetables as a way we can eat lots of bulk while saving precious kcal for chocolate. So I'd like us to consider that lettuce, strawberries, even apples are not going to be the medieval peasant's first-choice food for surviving winter, famine, and siege. This is not to say that the peasants cast out of Rouen in the middle of a siege, who spent the winter trapped between fortress walls and the besieging army, did not scrabble and some survive on the greenest, barest roots and grubs they could dig out of the soil. Just, fresh berries and leafy greens were not going to be their choice in better circumstances.
That said, certain produce did make it through the winter. Noble households in late medieval England, for example, served apples and various dried fruits as a Christmas delicacy. Fruits with a very limited shelf life, most prominently strawberries, were summer treats exclusively.
Really, though, when we talk about diet for survival it comes down to animal protein and grains. From a farming standpoint, the medieval agricultural year actually included multiple growing and harvest seasons. Storage for the year suggested by Jordan would have been a matter of managing consumption and protecting the grain from dampness/mold. But from a consumer standpoint, it's vital to keep in mind that medieval households--even in villages--were not American pioneer-style self-sufficiency. Bread, in particular, was a centralized product at one stage or another, whether it was having one's flour ground at the mill, use of the communal village/town ovens, or simply purchasing bread. I've talked on AH before about the medieval "moral economy", in which the price of a bread loaf was fixed at a cost considered to be one affordable by even the poorest day labourers. The size of the loaf would vary according to flour prices, but a half penny could always buy at least something.
The role of animal product in medieval diets was also a balance between home production and purchase. For families that could own meat animals, archaeological studies and account books show definite seasonal patterns of consumption of types of animals. Pigs were often slaughtered in the fall, obviously young animals in the spring. As far as dairy consumption, milk with its shorter shelf life was rare, or at least, it doesn't show up in records very often. Instead, we read much more about cheese production, and cheese is that food were molding is sometimes the point.
The most important animal product by far, for individual Christians and for the wider European economy, was fish. Preserved herring in particular is an enormously large proportion of winter and Lenten diets in the later medieval west. Salt preservation was practiced by that point. Another popular option for cities was to acquire dried fish from Scandinavia, where the northernmost climates were conducive to autopreservation of fish. This was actually a key product that helped knit the North into the expanding western economy!
Local hunting and fishing were contentious possibilities. Hunting was a noble sport, and nobles often took steps to limit peasants' ability to hunt for food. Fishing rights in rivers underwent similar legal struggles.
Medieval diets were somewhat less diverse than modern ones, it's true, and they certainly became less so in winter, in Lent, and during extreme struggles like famine and siege. For the most part, though, survival was a matter of choosing which food would provide sufficient calories and endure a few months, and saving the money to obtain what else was necessary to fill in the supply gaps--which, over the course of the Middle Ages, was na increasing percentage of the average diet.