"I was listening to music when my mom walked in"
Two things in the past, one interrupts the other/two happen at the same time
The one that started first: was/were + verb-ing
The one that interrupts/starts later: past simple
Time can also 'interrupt' something