There are 4 ways of talking about the past in Spanish. These tenses are called the preterit, imperfect, perfect and pluperfect.
PRETERIT: We use this tense to talk about a completed action done in the past, like when we say 'I did something' in English. A good clue for when to use this is an indicator such as 'ayer' or 'el año pasado', although you can use the tense without these indicators as well. (eg. 'Ayer, Juan habló con el estudiante.' Juan habló con el estudiante.' are both correct, one just indicates a specific time-frame).
IMPERFECT: We use this tense to talk about a past action that has no clear start or end point. This is usually the equivalent of 'I was doing something/I used to do something'. It is also always used to describe weather, a time or age in the past. Good clues for this tense include indicators such as 'generalmente', 'siempre' or 'por un rato', yet like the preterit, you can use the tense without these indicators as well.
PERFECT: We use this tense to talk about an action in the past that relates to the present, and is used exactly the same as the English 'I have done something'. This refers to actions that either still ring true in the present (eg. He cumplido todos mis deberes y nadie me ha dado más.) or actions that have happened very recently (eg. Ya he comido.)
PLUPERFECT: We use this tense to talk about a past action that happened previous to the past situation we are talking about, and is used like the English 'I had done something'. For example; 'Había visto la película antes.'