As you have noticed, the English language is full of idioms - a fact that makes learning English both, interesting as well as challenging.
Fortunately enough, in Alan’s tests you often can figure the meaning of an idiom:
If you take a look at the sentence in question you will find that a person who talks through their hat doesn’t know what they talk about:
‘Whatever you do take no notice of him because he’s not thinking straight - he’s talking through his hat.’[YSaerTTEW443543]
TOEIC listening, photographs: A balancing act[YSaerTTEW443543]
I don’t see that idiom talking through the head and I never heard it only I heard: talking through your hat-we say this when somebody speaks stupidity,/ talks nonsense/rubbish/ chatters away,/waffles on, /talks a load of waffle
waffle:(n) (U) (BrE) (informal)= language that uses a lot of words but does not say anything important or interesting