Past simple vs past continuous:
When we use these two tenses together, it shows us that the past simple action happened in the middle of the past continuous action, while it was in progress.
While I was studying, I suddenly felt sleepy.
We often use these tenses to show an action interrupting another action.
I broke my leg when I was skiing.
As I was going to work, I saw an old friend.
We were watching television when the power went off.