Here's a bit more detail: https://www.realclearhistory.com/historiat/2018/07/04/the_agonizing_death_of_james_garfield_331.html
Basically Garfield was shot but very likely would have survived if they left the bullet in him and let his wounds heal. However the unsanitary and unnecessary medical care he received in the weeks following the shooting are what actually killed him.
Title confuses me. Did he get kicked in the head by a horse or something after someone tried to kill him?