[v1 stem] + ながら [v5 stem (masu-stem)] + ながら [する → し] + ながら [来る → き] + ながら
The structure ながら is used to express two actions happening simultaneously, performed by the same subject. It attaches to the verb stem (masu-stem) of the first verb, and the second verb carries the main action. The verb before ながら describes the secondary or background action, while the verb after ながら describes the primary or focal action.
It is similar to English "while ~ing" or "as ~ing".
The action before ながら is the accompanying (secondary) action, and the action after ながら is the main action. Compare:
Here, eating is the main action and watching TV is the background activity.
Both actions must be performed by the same person. You cannot use ながら when two different people are doing the two actions. For example, you cannot say 「母が料理しながら私は勉強する」 to mean "While my mother cooks, I study." In that case, use ま間に or ま間 instead.
The verb before ながら stays in its stem form and does not change for tense or politeness. The final verb at the end of the sentence determines the tense and politeness level.
At a more advanced level, ながら can also mean "although" or "despite", especially with adjectives, nouns, or certain set expressions like ざんねん残念ながら (regrettably). This contrastive usage is distinct from the simultaneous-action usage described above.