〜ながら
Doing A while doing Bmachine translation
FormationVerb ます-form (drop ます) + ながら
〜ながら describes two actions by the same person happening in parallel: 音楽を聞きながら勉強します (I study while listening to music). The main action is the second clause — in that sentence, the main thing is 勉強, and listening to music is just the accompanying action.
Formation: take the verb's ます-form, drop ます, and add ながら: 聞きます → 聞きながら, 飲みます → 飲みながら.
〜ながら is also used for two things running in parallel over a stretch of life: 働きながら大学に通う (working while attending university). Don't confuse it with 〜あいだに: 〜ながら requires the same subject doing two things at once, while 〜あいだに just says one thing happens during the timespan of another, and the two clauses can have different subjects.
Examples
音楽を聞きながら勉強します。
I study while listening to music.
コーヒーを飲みながら話しませんか。
Shall we talk over a cup of coffee?
兄は働きながら大学に通っています。
My older brother works while attending university.