In many different cases, but I would say usually when they make eye contact with someone or to people in their workplace. In my country, people usually don't smile at everyone on the streets because that person may suspect us of wanting something from them.