Definition
This idiom is used to express that someone has done something foolish or strange, suggesting they are not thinking clearly.
You're thinking of wearing shorts in the snow? You need your head examined.
He spent all his savings on lottery tickets; I think he needs his head examined.
Anyone who knowingly walks into a dangerous situation needs their head examined.