~하다가 (~ha-da-ga) = while (doing something)
This particle has basically the same usage as ~ㄹ/을 때 and ~면서 but you can use this if you really want to emphasise on the two connecting actions/verbs.
Most of the time, you want to use ~하다가 when the two actions/verbs happen almost at the same time – literally.
Of course, like most other grammar particles, you can change remove 하 if the verb particle has no 하 in it.
Examples: 나 공부하다가 음악을 들면 외우기에 더 좋아.
If I study while listening to music, it is better for my memorisation.
나 강아지하고 길에서 걷다가 어떤 예쁘고 귀여운 여자를 봤어.
I saw a pretty and cute lady while walking with my puppy on the streets.
[…] 3. To express the speaker’s action (in the first clause) being interrupted by something that suddenly happened (in the second clause); while doing (A), (B) happened – read ~하다가 and ~(으)면서 […]