Question: is ayer preterite or imperfect?
Answer: Ayer is an adverb, meaning yesterday. It is neither preterite nor imperfect, as those are tenses for verbs. If you are asking whether to USE the preterite or the imperfect with ayer, it completely depends on the sentence. Example: Ayer, yo estaba en la plaza cuando unos dos coches se chocaron.