In the Middle Ages, knights were the elite soldiers. A good knight could take on many infantry and archers all by himself.
There were really only three types of soldiers in the day, knights, archers, and infantry, or foot soldiers. The infantry tended to be made up of peasant and serfs, and did not require many skills to become a soldier. They also made the least amount of money. The archers were better paid than the infantry, as they had bows to keep up and it required a fair amount of skill to be a decent archer. Knights were, of necessity, paid best of all the soldiers.
It was very expensive to be a knight. A good warhorse could cost up to 80 pounds sterling in the 13th century, which translates into the equivalent today of around $25,000 (USD). Armor and weapons were also quite costly to both buy and maintain.
Most of the knights came from the nobility or the sons of other knights. When a boy of aristocratic birth, usually a second or third son, was bout 8 years old, he would be sent to a neighboring castle to become a page. This was the first step to becoming a knight. During this part of his training, he would be taught by a tutor in reading and writing, Latin and French, and history. He would start doing physical training, and learn basic sword and spear fighting, as well as riding. He would have to be in great physical shape to bear the weight of the full plate armor that knights wear.
When he reached the age of 15 or so, he would then be promoted to squire, and in service to the knight he was sent to live with. In addition to starting his training in wearing armor and sword fighting while in the armor and riding a horse, he would also help the knight with various tasks. He would help the knight to dress, serve his meals, and take care of his horse and armor and weapons. He would go to tournaments with the knight, to assist him there as well.
At the age of 20, or thereabouts, if he has proven himself worthy, the knight would agree to knight the young man. The dubbing ceremony, as it was called, was very involved.
Knights had a code of chivalry, which demanded that they defend the weak and be courteous to women, and be loyal to the king and serve God. They were supposed to have mercy on vanquished foes, and not boast about their accomplishments. However, despite this code, they were usually little more than mercenaries for hire. Most knights were not firstborn sons, and therefore did not get any inheritance. They would fight to be able to plunder and pillage. They would also sometimes rape the peasant women, and had no fear of any reprisals, as the code to be courteous to women was usually thought to mean noble women.
Tournaments were ways for knights to build strength and show off their battle prowess for an audience during peace times. They would have mock battles, and one on one fights to prove who the better fighter was. These tournaments were great fun for the nobility and peasantry alike. It was usually a free event that anyone could go and watch. There were usually plenty of vendors selling their wares, which also attracted people to come.