Fiction and historically inspired movies often put the general, leader, captain, etc. at the head of the army and that person leads the charge.
I understand the Hollywood appeal of the lead actor heroically charging into battle. But, did military leaders actually do this?
It would be neat to hear how this changed over advances in military combat.
Yes they did! This particular Hollywood trope is entirely real, at least until certain rulers of certain states (notably the Roman Empire from the later 4th century) stopped leading armies in person. Leading by example was one of the commander's most important roles. If he failed to do so, his men would be much less likely to do as they were told.