Why you only have to wai if you are Thai.
In Thailand, the Thais do not shake hands when meeting someone. Instead, they greet each other with a wai. When you wai, you hold your hands together in front of the breast or the chin and bow your head. You use a wai when you meet and say goodbye, and if you say you are sorry or if you say thank you for a gift. In the latter case, you wai before receiving or touching the gift.
As a tourist, you should not use a wai when you say hello to a Thai. Thai people do not expect you to use a wai, and you may very well do it the wrong way if you try, as a wai is not just a wai. How it is done depend on your position in society and your position relative to the other person.
Two things are important when you initiate a wai: How high you held your hands in relation to the face, and how deep your head is bent. The higher you held your hands, and the deeper you bend your head; the more respectful you are of the other person. When you wai to a monk, your fingertip is touching your nose.
Thai people do not only use a wai to greet or show respect to another person, you will often see Buddhists use a wai in front of Buddha statues and shrines.
As mentioned, position in society has a great influence on a wai, as has the age of the persons. It will always be the youngest person who initiates a wai, after which the other person responds. However, the older person will initiate the wai if he faces a more important person, such as a monk, a boss or a public authority person.
Replying to a Wai
Even if you as a tourist are not expected to initiate a wai, you should answer a wai if you meet a Thai who wai you. It will be an insult if you do not answer a wai. The exception is the store staff, cleaning staff or other people that serve you. If they greet you with a wai, simply reply with a smile or a nod. You also do not answer a wai from a child with a wai, again, simply reply with a smile or a nod.
When replying a wai with a wai, just keep your hands at chest height and your elbows close to your body - as you can see in the picture above. You do not have to take into account age or position, which is only important when initiating a wai.
Please note, that in Thailand you do not hug and kiss on the cheek! If you greet a Thai with a hug or a kiss, you will make him very embarrassed. Usually, you do not shake hands either. You should only extend your hand for a handshake if a Thai extends his hand toward you.