Infantry was never banished from the medieval battlefield. In fact in most armies of the Middle Ages were primarily infantrymen. For example, English armies of the time were between ten and twenty percent cavalry; knights and mounted commoners with the rest being infantry. Yet, the single most constant image of medieval warfare is the knight in full armor crouched over his lance charging at another similarly armed and armored knight.
This image persists mainly because from 1066 and the Battle of Hastings , to 1346 and the Battle of Crecy, the armored knight, while not alone on the battlefield, was certainly the dominate feature of war. That is to say that the armored knight in company with his fellow knights was the battle winning force of the Middle Ages. This dominance is easily explained by the fact that the knight was generally a full time warrior. Supported by the work of others lower down the feudal system the knight had plenty of time to train at war, as well as the wealth to buy the best gear; heavy armor for him and his horse, swords and lances of the best quality.
However, by the start of the 1300s this situation had started to change. Well trained and well disciplined infantry formations armed with long pole weapons, such as the pike, or halberd or bill, began to win battles against charging cavalry.
The medieval pike was basically a very long spear. Usually between 10 and 18 feet in length, it pike was held in both hands and used in a mass formation of foot soldiers. The pike had a simple point on the end and was strictly a stabbing weapon.
The halberd was a variation on the pike. Instead of a simple point, the halberd had an axe and a hook as well as a point, so the weapon could be used to stab, cut or hack and also to hook and pull a knight off his horse.
The bill was primarily an English weapon; it was shorter than a pike, between 5 to 9 feet long and much more maneuverable. The bill’s head had a short spear point and short blade and hook similar to the halberd.
For example at Courtrai in 1302, Bannockburn in 1314, and Morgarten in 1315, infantry armed with these pole-arms defeated mounted knights. In all three of those battles the knights were placed a disadvantage by having to charge through a swamp such as at Bannockburn and Courtrai or being ambushed with no time to form up such as at Morgarten.
However, by the 1339 Battle of Laupen, Swiss halberd and pike armed infantry defeated a French cavalry force on open ground. Also by 1346 and the Battle of Crecy the English billmen, supported by the longbow, defeated the French again in open battle.
From the 1350s on, battles in Europe became much more an all arms affair, with pole armed infantry, armored cavalry and arrow shooting “artillery” all playing their parts in the fighting.