These three different tenses differ in subtle ways. Pretérito perfeito - this tense is used when describing an action that has been completed. Há dois dias atrás, fui ao supermercado. Two days ago, I went to the supermarket.Pretérito Imperfeito - this is used in different contexts:1) When describing an action that occurred with frequency in the past/habitual actions. Quando eu era mais novo, eu comia sempre fruta depois de almoço.When I was younger, I always ate fruit after lunch.2) When talking about an action that happened at the same time as another.Enquanto eu comia uma sandes, ele lia o jornal. While I was eating a sandwich, he was reading the newspaper.3) The imperfeito is always used when dealing with time and age. Eu tinha trinta anos quando eu conheci o meu marido.I was twenty years old when I met my husband.Eram nove horas quando ele ligou. It was nine o'clock when he called.Pretérito Mais-que-Perfeito - this tense is used to describe an action that was completed before another. Quando eu cheguei a casa, ele confessou que dormira o dia todo.When I arrived home, he confessed he had slept the whole day.