Here I go:
We use pretérito indefinido as you use Past Simple:
I studied english - Yo estudié inglés
I bought a car - Yo compré un coche
And we use pretérito imperfecto as you use past continuous:
While he was watching TV, his brother did his homework - Mientras él miraba la televisión, su hermano hizo los deberes.
So, we use pretérito indefinido when something ended.
I studied - Yo estudié / I bought - Yo compré / I read a book this morning - Yo leí un libro esta mañana /
and we use pretérito imperfecto when we were doing something, something happened!
Yo compré - it means that you bought something, that's all
Yo compraba - I was buying.
I hope it has helped you, XXOO