Knights engaged in mounted shock combat were initially a Frankish super-weapon. Inevitably, it spread to other regions and kingdoms, including Arabs and Byzantines. Plate mail was very effective against missile weapons of the 9th century, which mostly consisted of short bows. In response to the proliferation of knights, the crossbow emerged as an effective ranged deterrent, perhaps rediscovered or perhaps imported from China. Unlike an arrow delivered by a short bow, a crossbow bolt that found a knight would pierce through his plate and do significant damage. The main drawback of crossbows was the slow reload time. By the 13th century, the English borrowed and perfected the Welsh longbow, about as tall as a man, with an impressive 100lb pull force. Combining the short reload time of a short bow and the wallop of a crossbow, the only drawback was that it was difficult to master. The longbow was murderously effective against charging knights, especially with hundreds of longbowmen firing volleys in quick succession. Equipping a longbowman was far cheaper than equipping a knight. This raised the status of peasants: now they could once again hold a important position on the battlefield.
Muskets came later but occupied a similar niche: a group of musketeers buttressed by pikemen spelled disaster for charging knights. Pikes were longer than the knight's lances and could be planted into the ground. Meanwhile musketeers would mow down a group of knights.
graph TD AW[Armor weight] --> |Bolts could pierce| C[Crossbows] C --> |Too slow| L[Longbows] L --> PP[Peasant Prosperity] C --> |Attempt to prevent puncture| AW style C fill:yellow,stroke:#333,stroke-width:4px style L fill:yellow,stroke:#333,stroke-width:4px
Source: Late Middle Ages