The French language has a strange way to talk about the body!
Consider the following examples
Je me suis fait mal au dos
I hurt myself in the backJ’ai mal à la tête
I have pain in the head (meaning: I have a headache)J’ai eu une opération au genou droit
I had surgery on the left knee
But, the following is also possible
Mon dos va mieux, ma jambe me fait moins mal
My back is better, my leg doesn't hurt as much
Je me suis rétabli de ma blessure au dos.
I have recovered from my back injury (my injury to the back)
Comment ça fonctionne
I have a feeling that if we try to explain the workings of this in detail, you’ll be thinking about it during a conversation and fail to come up with the right answer.
French speakers don’t know these rules. We simply use them because they sound right. The goal is for you to do the same, through enough exposure to these expressions in different contexts.
We can nonetheless look at different examples to try to understand.
When the verb is reflexive — so the person is doing the action on their own body (to them) — we use a definite article (le, la, les)
Je me suis lavé les cheveux
I washed my hair
Il s’est cassé la jambe
He broke his leg
Ils se sont brossé les dents
They brushed their teeth
Je lui ai serré la main
I shook his hand
Je l’ai embrassée sur la joue
I kissed her on the cheek
Elle lui a serré la main
She shook his hand
Tu m’as lavé les cheveux
You washed my hair
If you start with mon/ma – then you don’t need another article
Ma main me fait mal
My hand hurts
Mon dos va mieux
My back is better
Exercise
Add the missing words or words. Refer to the English translation.
Paul broke his leg.
Paul s’est cassé ____ jambe.
She kissed him on his forehead.
Elle l’a embrassé sur ____ front.
I took him by the arm.
Je l’ai pris par ____ bras.
My left eye hurts.
J’ai mal à ____ gauche.
I have a headache.
J’ai mal ____.
My stomach hurts.
J’ai mal ____ ventre.
She sprained her ankle.
Elle s’est foulé ____ cheville.
I have bad knees (I have problems…)
J'ai des problèmes ____ genoux
My teeth hurt.
J'ai mal ____ dents.
My back hurts.
J'ai mal ____ dos.
Answers
Paul s’est cassé la jambe.
Elle l’a embrassé sur le front.
Je l’ai pris par le bras.
J’ai mal à l’œil gauche.
J’ai mal à la tête.
J’ai mal au ventre.
Elle s’est foulé la cheville.
J'ai des problèmes aux genoux.
J'ai mal aux dents.
J'ai mal au dos.
Another thing the examples illustrate but which is unintuitive for English speakers (and which I got from the examples): when the verb is reflexive the auxiliary is "être", even if the auxiliary is "avoir" when the same verb is not reflexive.
The use of the article that you illustrate goes also with what are, strictly speaking, non-reflexives like in your last four examples, where one person is doing something to another person. But in those examples the auxiliary is "avoir".