He's a ventriloquist and his arm was in the dummy which he made mouth of to some gun slingers. They shot the dummy for this and his arm got shot up as well.
Ventriloquists often do insult comedy. The joke is that he used the dummy to talk shit to some gunslingers, which caused them to shoot the dummy, which is why the doctor is fixing his arm.