~(으)면서 (~(eu)-myeon-seo) – while doing something (a second action is done simultaneously)
For this grammar principle, it’s important to understand the nuance because there are several more other grammar principles with similar meanings but the difference lies in the nuance.
So for ~(으)면서, the two actions (verbs) connected by this word must be done simultaneously.
If you are trying to connect two actions, in that the first action is followed by the second action, you should use ~자마자 instead.
In a way, you can look at ~(으)면서 as a way of describing someone or something multi-tasking.
난 열심히 공부하면서 항상 좋아하는 음악을 들어.
While I’m studying hard, I would always listen to my favourite music.
사람들은 운동하면서 음악도 들으면 더 힘이 난다고 해.
People say that one would get more strength when one exercises while listening to music.