There are multiple ways to execute this gesture, depending on one’s social class, gender and age. Generally, the higher the hands are in relation to the face and the lower the head is bowed, the more respect the wai-giver is showing.
The wai began as an ancient greeting with which people showed each other they were carrying no weapons. It is also said to be related to a Buddhist religious custom. After certain prayers, it is customary to clasp one’s hands together and bring them down towards the ground three times.
A wai is a way to show respect, but also to say sorry, thank you or forgive me. When a young person has made a mistake or offended an adult, he will quickly raise his or her hands in a wai. This is a common rule in family life too.
When meeting a monk, a lay person will always greet him with a wai. The monk responds to this by saying something to greet the person, but a monk never wais ordinary people. However, amongst themselves, junior monks do have to wai senior monks.
The wai is the equivalent of the nod with which Europeans and Americans sometimes say hello to each other in passing.
If in doubt, just nod and smile!