When you talk about simple actions that have been completed in the past, you use the PRETERITE tense or el preterito. Here is how you know when to use it:
An action is completed in the past. I ate. I slept. Yo comi. Yo dormi.
The action has a time-marker mentioned:
- last night- anoche
- yesterday – ayer
- For a year – por un año
- For two hours – por dos horas