Here are some sites with a good explanation of those two tenses.
Thank you for using the Jiskha Homework Help Forum. This was always one of my favorite things to teach!
Imagine, if you will, that you are going to paing a mural. You begin with the background (~ ~ ~ ~ ~ ). That is the imperfect, which in one word is "description." Note the English: was + ing, used to + infinitive, "ed" which overlaps with the Preterit. Now you paint the action. This is the Preterit. (/-/-/-/) Note the English: DID or "ed." The lines represent "ongoing event; we have no idea when it began nor if it ver ended = Imperfect vs. the lines that represent an action with a beginning and an ending = Preterit.
To illustrate: I used to be walking toward the door = salía = I was leaving the room. BUT I never go through the door way. This is the Imperfect. Then I walked to the door, through the door and around the corner = I DID leave the room. This is the Preterit. Happily my students always got the difference between the 2 past tenses. This makes the Spanish language so much "richer."