she cooked dinner. (Past Simple: The action of cooking dinner was completed before or at the same time as arrival, but the focus is on completion.)
she was cooking dinner. (Past Continuous: The action of cooking dinner was in progress when I arrived, suggesting it was interrupted or ongoing.)
she'd cooked dinner. (Past Perfect: The action of cooking dinner was completed before I arrived.)
he was living in France. (Past Continuous: This implies he was living in France for a period of time leading up to and during the time he spoke French. The focus is on the ongoing state.)
he had lived in France. (Past Perfect: This implies he had completed a period of living in France before he spoke French. The focus is on the completed action of living there as a reason.)
while I did my homework. (Past Simple: This suggests the actions happened around the same time, possibly with music playing in the background while homework was done. It implies a more simultaneous, less dependent relationship.)
when I'd done my homework. (Past Perfect: This indicates that the homework was completed before I started listening to music. The listening to music happened after the homework was finished.)
and I read it. (Past Simple: This implies a sequential action. She gave me the book, and then I read it.)
but I'd read it. (Past Perfect: This implies that I had already read the book before she gave it to me. The 'but' suggests a contrast or a slightly unexpected situation.)
the children were going to bed. (Past Continuous: This describes an action that was in progress when I got home. The children were in the process of going to bed.)
the children had gone to bed. (Past Perfect: This indicates that the action of going to bed was completed before I got home. They were already in bed when I arrived.)