An expression of sympathy or pity for someone else's misfortune (a somewhat formal phrase).
事故で家を失ったと聞き、私は彼女に『お気の毒に』と言った。
Hearing she had lost her house in the accident, I said to her, 'I'm so sorry for your loss.'
同僚が病気で休むと聞いて、上司は『お気の毒に』と声をかけた。
When the boss heard a colleague was off sick, he said, 'I'm sorry to hear that.'
葬儀の場では『お気の毒に存じます』のように、より丁寧な形で使われることもある。
At funerals it may be used in a more polite form, such as 'My condolences.'