Chivalry was a set of ideas about how a knight ought to behave. The word comes from the old French word 'chevalerie', which was used for men who fought on horseback, like our English word 'cavalry'.
A Perfect Knight
A knight was supposed to show bravery, strength and skill in battle (this was called prowess), to respect women, to defend the weak and the poor, to be generous to others and loyal to his lord, his family and his friends. He was meant to behave at all times with courtesy - which meant not just being polite or having good manners but showing kindness and respect and thinking about the feelings of others.
Courtesy also involved acting correctly when fighting. For example, it was not courteous to try to injure an enemy's horse. If a knight knocked his enemy off his horse, he should wait until the other knight mounted again before attacking. If the horse had run away, the knight should get off his own horse and fight his opponent on foot. It was not courteous to kill an enemy if he begged for mercy and agreed to be a prisoner.
A knight rescuing a damsel in distress from a monster.
Stories and poems like the one you are reading by Chrétien de Troyes show Arthur and his knights acting chivalrously. A lot of knights did not behave as well as this in real life, particularly in war. However, the idea of the perfect knight was a very important one in the Middle Ages. In the 12th Century, a writer called John of Salisbury declared that it was a knight's duty 'to protect the Church, to fight against treachery, to reverence the priesthood, to fend off injustice from the poor, to make peace in your own province, to shed blood for your brethren, and if needs must, to lay down your life.'