The imperfect tense is used for actions that don't have an absolute start and end, or actions that repeat. For example, if you used to play guitar. You didn't start and end on a certain day. Also, whenever you use time, age or weather in the past it is in the imperfect. As for the preterite, it is used for specific dates and definite things. For example, I went to the mall. There was a certain time and date that it happened.