As a general rule, the preterite is used when there is a finite beginning and end. If there is any ambiguity then use the imperfect. There are also specific rules for each tense.
If you are describing a person or a place then always use the imperfect but if you are describing what happened (an action) then you would use the preterite.