Both can be used in one sentence....
past continuous tells you that an action took place for a while, then it was interrupted by something else (past simple).
Examples:
- She was reading a book when her parents entered the house.
- I shouted at them while they were playing games.