This is the 318th most frequent Spanish word.
ayer
"Yesterday."
In this sentence, "ayer" is used as an adverb to indicate that the action occurred on the day before today.
Ayer fui al mercado.
Yesterday, I went to the market.
Here "ayer" also functions as an adverb, specifying the time frame when the event happened.
Quedé con mis amigos ayer por la tarde.
I met with my friends yesterday afternoon.
In this context, "ayer" is again an adverb describing a day prior to today, but used as the subject of the sentence to define the day itself.