Literally a headache; idiomatically a troublesome or vexing problem — something that causes worry or trouble.
締め切りが重なって、本当に頭の痛い週だ。
Deadlines have piled up — it's truly a headache of a week.
彼の病気のせいで毎晩頭の痛い思いをしている。
Because of his illness, I have worried every night.
税金の計算は頭の痛い作業だ。
Calculating taxes is a headache-inducing task.