The difference lies in whether the accusative object tells a body part or a person.
Ich habe mich am Kopf verletzt.
This tells who is injured. The location of the injury in told as an adverbial
Ich habe mir das Bein verletzt.
This tells what is injured. Instead of a location of the injury, who bears the result of the action is told as an addition. As usual as a dative object.
The latter form is also useful if you want to tell where it happened.
Ich habe mir im Urlaub das Bein verletzt.
Ich habe mir am Kopf verletzt.
This is ungrammatical because the verb verletzen requires an accusative object. People who hear that will likely ask Was hast du dir verletzt? asking for the body part they overheared.
Ich habe mir meinen Kopf am Kopf verletzt.
Ach! Du meinst deinen Kopf am Kopf der Fräsmaschine. Tja. Nächstes mal besser aufpassen!
Ich habe mich das Bein verletzt.
This is ungrammatical because it features two accusative objects and the verb verletzen only takes one. People will likely correct you Mir. Du meinst mir.