The preterite is used to describe actions that were completed at a specific moment in the past. For example, "Ayer, Marina me pidió ir al cine". This action happened yesterday (ayer) and is not a continuous action so it has to be in the preterite tense (me pidió). The imperfect is used to describe actions that have already happened but there is no time specification. For example, "Cuando tenía 12 años, me gustaba ir al cine". This action happened some time when the person was 12 years old and it is unclear if the action is over or not e.g. they might still like to go to the cinema now, as well as when they were 12, so we use the imperfect tense (tenía and me gustaba).