From Nookipedia, the Animal Crossing wiki
In the days leading up to Yay Day, villagers will practice their compliments when the player speaks to them. On Yay Day, when the player speaks to a villager, the villager will compliment him or her and ask the player to give a compliment in return. The player will then be able to type a compliment. Doing this increases the friendship level between the player and villager.
Depending on the villager's personality, the villager may not accept the compliment or they will ask the player to give them a new compliment.
After Yay Day
Further on in the year, some villagers mention the compliment given to them on Yay Day, peppy or lazy villagers remembering them more than others. Most peppy villagers say: "<Compliment>! Why does that sound so familiar? Oh yeah! That was the cheesy pick-up line from like, a year ago!" And the lazy villagers say: "<Compliment>! I can't wait to say it to my crush!"