Ответ:

  1. They were having dinner when the phone rang.
  2. I wasn’t listening while the teacher was explaining the exercise.
  3. We were playing football when it started to rain.
  4. What were you doing at 8 o’clock last night?
  5. She was reading a book while her brother was watching TV.

Past continuous describes an action in progress; past simple describes an event that interrupts it or a completed past event.