This is a topic that I’ve skimmed over before but will go into more detail now.
Although knighting had been a simple affair during the early Middle Ages, the ceremony gradually became more and more complicated. By the end of the Middle Ages, it was performed in the grounds before some great castle amid great celebrations.
On the day before the knighting ceremony (known as dubbing) took place, the squires had their hair cut short to remind them that they should humble themselves in the eyes of God. In those days, a man regarded his hair as his best feature or crowning glory. Then, they bathed to show that their sins were being washed away and that they were about to start a new life. After that they put on black shoes and lay on their beds. The fact that the shoes were black, the colour of death, reminded them that they would die on day and the bed which provided comfort and rest reminded them they would rest in Heaven if they lived up to the ideals of knighthood.
The squires then recited the laws of chivalry. See this post for the Code of Ethics.
After this the squires attended a banquet where they ate their fill. It was the last food they were to have for many hours. That night they entered the castle chapel and laid their weapons on the altar so that they could be blessed by the priest. The squires spent the rest of the night in the chapel praying. This part of the ceremony was called the Vigil at Arms and it reminded the squires that they should only use their weapons in God’s service.
At last the great moment arrived and the squires filed out on to the green lawns before the castle where a huge crowd was eagerly waiting to see the climax of the ceremony. Each squire advanced in turn and had his sword buckled on by one knight and his beautiful golden spurs by another. Then the most senior knight present came forward and gave the squire a cuff on the neck or a light blow on the shoulder with a sword to show that the squire was now a knight. This was known as the giving of the accolade.
Of course, many squires were dubbed knight in far less romantic circumstances. Many received the accolade on the field of battle surrounded by their dead and dying comrades. Although squires were usually knighted by people who were not related to them, fathers sometimes dubbed their own sons. No matter who conferred the honour or where the ceremony took place, this was the greatest honour any medieval soldier could receive.