This is a practical oversimplification which will be right most of the time. For more detailed information see Mastery of the Tenses!
"was doing" / "were doing"
For unfinished past actions
- I was working on my thesis when I met you.
- I saw you waiting at the bus stop.
- I wanted to know what they were doing.
For past activities at a specific time in the past
- When you arrived I was cooking.
- I was working at 11am.
- The sun was shining and the birds were singing.
For actions that were interrupted by another
- The phone rang while I was cooking.
- The cat ran across me as I was driving.