Avoir mal à — saying what hurts
French does not say "my head hurts". It says I have pain at the head — avoir mal à + the definite article.
| à + le | au — J'ai mal au dos. |
|---|---|
| à + la | à la — J'ai mal à la tête. |
| à + l' | à l' — J'ai mal à l'oreille. |
| à + les | aux — J'ai mal aux jambes. |
The contractions are the same ones you already use for places (je vais au marché), so there is nothing new to learn here except the pattern itself.
Note the article is le/la/les, never mon/ma/mes. "J'ai mal à ma tête" is the mistake an English speaker makes; the body part takes the definite article because it is obvious whose head it is.
To ask: "Où est-ce que vous avez mal ?" — Where does it hurt? To answer a doctor: "J'ai mal ici." — It hurts here.
Knowing the rule is not the same as producing it.
This page explains the pattern. The track drills it: the point arrives inside a mini-dialogue, then production marked against a CEFR descriptor, then a module test that returns you to your two weakest sessions if you miss it.