To Wai you put your hands together on your chest and bow your head a little towards the tips of your fingers. There are different reasons to Wai in Thailand. It is used as a greeting, a thank you, to say goodbye, to apologize and to pray to Buddha.
Thais don’t wai everyone, it is usually a sign of respect to someone who is older or wiser such as a Monk. You shouldn’t wai a younger person but you should return the wai if they wai you. Likewise you wouldn’t wai every shop owner when you make a purchase or a maid when she cleans you room.
As a tourist you’ll hear many people tell you not to wai because you aren’t Thai, but i think thats an ignorant way to think. This is a Thai custom that has meaning and feeling in it and as long as you wai in the right circumstance you will be sure to make a Thai smile and even if you did it wrong or it seemed awkward the Thais love to see someone try aspects of their culture.