For the most part, peasants had no place in medieval armies. Fighting was for free men, not serfs.
The vast majority of free men were peasants. The english yeoman, for example, even though he might own land in his own name (a freehold), was still considered a peasant. He would most likely be required to contribute to the military forces of the lord governing his district, either in person or in kind.
Also, when war came to a lords district, he would indeed sometimes call his serfs to arms.