The King of Rohan who died at the Battle of the Pelennor Fields was Théoden. He led the Rohirrim cavalry to Gondor’s aid during the defence of Minas Tirith, riding against an army vastly larger than his own.
Théoden’s charge helped turn the battle. The Rohirrim surprised Sauron’s forces on the Pelennor, destroyed siege equipment and routed enemy formations. Théoden personally defeated the chieftain of the Haradrim before the Witch-king of Angmar attacked him. The Witch-king’s dart killed Théoden’s horse, Snowmane, which fell and crushed the king beneath it.
Théoden was not left entirely helpless. His niece Éowyn, disguised as the warrior Dernhelm, confronted the Witch-king, while the Hobbit Meriadoc Brandybuck wounded him with a Barrow-blade. Éowyn then destroyed the Nazgûl lord. Before dying, Théoden named his nephew Éomer as his successor.
Théoden is sometimes confused with Théodred, his son, who died earlier at the First Battle of the Fords of Isen. Éomer survived the Pelennor Fields and became the next King of Rohan.