Used to express:
1. activities in progress in the past.
At seven o'clock I was having breakfast.
2. descriptions of things in the past.
She was wearing a blue sweater.
3. something that got interrupted.
I was having a shower when the phone rang.
4. an incomplete activity.
I was trying to finish that assignment yesterday.