When we talk about events that happened in the past, sometimes we want to specify that one of the things we were doing, like reading a book, lasted for somewhile. We do this by using the past continuous:
I was reading a book when the phone rang.
The was reading conveys the meaning that the action happened in the past, and it lasted a while, and it the action was not completed yet when the phone rang.
In Turkish, to convey this meaning, we combine the continuous marker -İyor and the past copula -(y)Dİ.
As usual, the personal suffixes come after -(y)Dİ. When making questions, we put the mİ particle between -(İ)yor and -(y)Dİ.
Notice, however, the English version of this sentence makes it seem like the hugging took place once. But of course the conveyed meaning is: regularly.
We use the past continuous to contrast between two events, so it is a commonly used tense/aspect in narratives. Below you will see a short story that utilizes the past continuous to try to clarify its use.
"Bir pazartesi akşamıydı. Yağmur yağıyordu. Ben matematik sınavım için çalışıyordum. Annem, mutfakta akşam yemeğini hazırlıyordu. Ablam salonda televizyon seyrediyordu. Kedimiz yatağında uyurken, köpeğimiz kemiğiyle oynuyordu. Hepimiz babamın eve gelmesini sabırsızlıkla bekliyorduk."
"It was a monday evening. It was raining. I was studying for my math test. My mom was preparing dinner in the kitchen. My (elder) sister was watching TV in the living room. While our cat was sleeping in its bed, our dog was playing with its bone. We were all impatiently expecting my dad to come home."