하다 말다 했다 literally means to do, to stop and to do again, and so is used to describe things done 'on-and-off':
여자가 5년 동안 한국어 공부를 하다 말다 했대요.
The woman said she'd been learning Korean on and off for 5 years.
3년 동안 작가가 새로운 책을 쓰다 말다 했는데 내년에 출판될 거에요.
The author had been writing his new book on and off for the past 3 years, but it will be published next year.
평생 기타를 치다 말다 했어요.
I've been playing guitar on and off my whole life.
친구가 지난 10개월 동안 다이어트를 하다 말다 해서 지금까지 효과가 없어요.
My friend has been dieting for the last 10 months on and to date it has had no effect.
2개월 동안 운동을 하다 말다 했고 지금도 근육을 만들고 있어요!
I've been working out for just two months and now I'm getting more muscular!
대학교를 다녔을 때 남자친구를 만나다 말다 했어요.
I dated a guy on and off when I was in university.
어젯밤에는 비가 오다 말다 했어요.
Last night it rained on and off.