This has always been a rather unclear and confusing topic for me. Back then, did most infantry simply consist of untrained peasants, or of professional Men at Arms?
During the medieval period it was uncommon for kingdoms to have a perennial standing military. This is due to the economics of feudalism, and the inability of feudal governments to pay or organize a permanent fighting force. This is in direct contrast to the preceding Roman Empire, which had literal legions of salaried professional soldiers.
To answer your question, most infantry would have been largely unskilled peasants that were called to defend the realm during wars or rebellions. Of course there are some exceptions such as the Swiss pikemen and English longbowmen. Most exceptional though were the bands of roving professional mercenaries who plagued Europe during the 14th-15th centuries.
So were most infantry relatively untrained peasants? Definitely yes. Were there some fascinating exceptions? Absolutely and that is what is so great about the medieval period, it is full of contradictions at every level.