The preterite tense (or pretérito perfecto) refers to an event that occurred once in the past, whereas the imperfect tense (pretérito imperfecto) refers to an event that occurred continuously or more than once in the past.
For example:
Pretérito perfecto: Le escribí una carta a mi tía (I wrote a letter to my aunt). In this tense, the verb "escribí" implies that the speaker only wrote one letter.
Pretérito imperfecto: Le escribía cartas a mi tía (I wrote letters to my aunt). Using the imperfect tense implies that the speaker wrote regular letters to their aunt, rather than just one.