i was sleeping.
they were dancing.
past continuous is used to show an action that was continuous in the past unit another action interrupted it.
the continuing action is past continuous and the interrupting action is simple past. here is an example:
i was sleeping when you called me .
in this example , the action of sleeping was continuing over time until the telephone call interrupted the sleeping.
here are some more examples:
she was playing in the park when it started to rain.
while they were taking , the pizza arrived.
the car crashed when we were walking across the street.