You see a lot in movies/television that kings and queens stand on the front lines in battles and heroically lead charges into battles. They demonstrate superior combat skills, even the older monarchs. This has always confused me - seems reckless to have political leaders on literally the first line of a head-to-head battle, especially in a monarchy where they are the most important individual in a society. Did this really happen? I know about Leonidas leading Spartans against the Persians at Thermopylae, but they were committed to sacrificing their lives. Especially in battles that were primarily fought with swords/pikes, it seems reckless to have strategic/political leaders on the very front line.
Not wanting to discourage further comments, but the question does pop up enough that it's in the FAQ.
Later on in the Medieval period, u/MI13 comments on why a king might choose to fight.
This thread also has multiple answers relevant to your question; I particularly recommend the answers by u/Emperor_NOPEolean, whose thread also has more input from u/MI13, and u/Daeres.