Most peasants during the Middle ages did not fight at all, except in revolts and uprisings, usually with terrible outcomes.
If they were taken along for the (military campaign) ride by their feudal lord, it is most likely they would have avoided the battlefield altogether, providing auxiliary services, e.g. setting up camp, feeding the horses, cooking, tending to their liege, etc.
Conscription was not really a thing until the mid-Renaissance (roughly), and the vast majority of battles in the Middle ages was fought by nobility, ranging from lower class to dukes and lords.